How to uninstall php 7.1

Active3 hr before
Viewed126 times

6 Answers


Meta Stack Overflow , Stack Overflow help chat , Stack Overflow Public questions & answers ,Thanks for contributing an answer to Stack Overflow!

To remove php 7, you can try:

sudo apt - get purge php7 .0 - common

I have upgraded PHP old version to latest php7 but unable to start its services.,to remove all versions of php7, you still need to run some extra steps to completely and utterly remove php7:, Are there countries that ban public sector unions, but allow private sector ones? ,Now I want to revert back or remove php7 that i can do the user machine active with the old version.

To remove php7.0 use

sudo apt - get purge php7 .0 - common
load more v

$ sudo apt - get purge php7.*
   $ sudo apt - get autoclean
$ sudo apt - get autoremove
load more v

This will remove all php7 versions, be it php 7.0 or php 7.1 etc..,apt/apt-get autoclean → cleans obsolete deb-packages, less than clean,apt/apt-get autoremove → removes orphaned packages which are not longer needed from the system, but not purges them, use the --purge option together with the command for that.,Install all the required extension, so it won't make any error in future

This will remove all php7 versions, be it php 7.0 or php 7.1 etc..

sudo apt - get purge php7.*
   sudo apt - get autoclean
sudo apt - get autoremove
load more v

if you are using laravel for some reason then modify your fpm.service to point to the 7.1 version and then restart it as well,I need to downgrade PHP on one of my VMs from 7.2 to 7.1 on Ubuntu 16.0.4. The last time I tried to remove just PHP and replace it with a different version, I had all kinds of issues with Apache and MySQL. Is there a quick way to downgrade PHP from 7.2 to 7.1 without having to fully reinstall and configure Apache (latest version as of this writing) and everything else on the server?, How can an NPC replace some pages of a book with different pages, without leaving a trace of manipulation? ,I have to downgrade due to bad information I received from a software vendor that claims their application runs on PHP 7.2. Turns out it must have 7.1.

I installed PHP 7.1 along side PHP 7.2. I also installed most of the needed extensions for PHP 7.1. I then did a2dismod php7.2 and a2enmod php7.1 so that I could switch over to PHP 7.1 while keeping 7.2 still installed on the server. Most of my sites work after making the switch. The only site that doesn't seem to be working is a Joomla site. The full list of commands I ran are below:

sudo add - apt - repository ppa: ondrej / php

sudo apt - get update

sudo apt - get install php7 .1

sudo apt - get install php7 .1 - cli php7 .1 - common php7 .1 - json php7 .1 - opcache php7 .1 - mysql php7 .1 - mbstring php7 .1 - mcrypt php7 .1 - zip php7 .1 - fpm

sudo a2dismod php7 .2

sudo a2enmod php7 .1

sudo service apache2 restart
load more v

With new PHP 7.3 installed, you can remove your old PHP versions if you want. ,This will install PHP 7.3 core extensions and PHP 7.3 CLI.,Once everything is installed, run php -v to make sure PHP 7.3 (CLI) is installed. ,So that's it, you should have PHP 7.3 running. Note that automatic upgrades (unattended-upgrades) will not work on Ondrej's PPA, so you still need to manually upgrade your PHP versions.

sudo add - apt - repository ppa: ondrej / php # Press enter to confirm.
sudo apt update
load more v

Other "uninstall-undefined" queries related to "How to uninstall php 7.1"