What are the best practices for uninstalling PHP 5 before installing PHP 7 to avoid any conflicts or issues?

When upgrading from PHP 5 to PHP 7, it is important to properly uninstall PHP 5 to avoid any conflicts or issues during the installation of PHP 7. This can be done by removing the PHP 5 packages and dependencies before installing PHP 7. ```bash sudo apt-get purge php5* sudo apt-get autoremove ```