close

Uninstall php 7 in ubuntu 18.04

Hello Guys, How are you all? Hope You all Are Fine. Today we are talking about Uninstall php 7 in ubuntu 18.04 in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Uninstall php 7 in ubuntu 18.04 Error Occurs?

Today we are talking about Uninstall php 7 in ubuntu 18.04 in php.

How To Solve Uninstall php 7 in ubuntu 18.04 Error ?

  1. How To Solve Uninstall php 7 in ubuntu 18.04 Error ?

    To Solve Uninstall php 7 in ubuntu 18.04 Error Firstly you need to restart the apache to take all in effect and also You can install mutliple php version using this post or just using

  2. Uninstall php 7 in ubuntu 18.04

    To Solve Uninstall php 7 in ubuntu 18.04 Error Firstly you need to restart the apache to take all in effect and also You can install mutliple php version using this post or just using

Solution 1

This will remove PHP

sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "\n" " "`
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
sudo rm -rf /etc/php

Solution 2

Firstly you need to restart the apache to take all in effect and also You can install mutliple php version using this post or just using

sudo apt update
sudo apt-add-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php5.6 php5.6-cli php5.6-common

disable php7.2:

sudo a2dismod php7.2

enable php 5.6:

sudo a2enmod php5.6

After all restart the apache again to take into affect

service apache2 restart

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment