Remove PHP from Ubuntu 14

Asked

Viewed 14,471 times

7

I used the following commands to remove PHP from Ubuntu:

sudo apt-get purge php5 php5-cli libapache2-mod-php5 php5-mysql phpmyadmin
sudo rm -rf /etc/php5

But when executing the command php -v at the command line, I get the following result:

PHP 5.3.29 (cli) (built: Feb  3 2016 18:12:10) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies

I want to remove PHP completely.

  • I haven’t dealt with Linux in a while, but it wouldn’t be: sudo apt-get -y purge php.* OR sudo apt-get remove "php*".

  • see http://answall.com/questions/106632/ap%C3%b3s-command-apt-get-dist-upgrade-was-installed-o-php-7-as-back-to-o-5

  • before executing the php -v command you ran service apache2 Restart?

  • the command php -v does not depend on apache because the command goes straight to binary php.

  • You don’t have to exclude your question just because it’s duplicated. Duplicates, when created organically, tend to be beneficial to the site by showing different ways of asking the same question, increasing the chances of someone with the same doubt finding the solution through a google search, for example. But if you want to keep it erased all right too, the choice is yours.

  • 1

    @Math right! The question that already exists helped yes but only by applying the solutions that are in the comments and all the answers. I’ll leave that comment in case anyone has the same question.

  • The question is "reopened" alone when you restore it? Ah, I’ve seen what happened: http://answall.com/posts/113720/revisions

  • @Math when I clicked still had no answer to the question, believed it was another subject. But after realizing that the error was another and that after correcting it and applying the solution of the other question the problem was solved, there was no turning back. But yes, now I consider it duplicate.

  • So then I closed it

Show 4 more comments

1 answer

5

With the command below, you remove all packages that the name starts with PHP and everything related to it

sudo apt-get -y purge php.*

You can see more about this here

  • Hello Rafael, thanks but it took more things. It was necessary to remove the binaries and do the apt-get autoremove

Browser other questions tagged

You are not signed in. Login or sign up in order to post.