3

I really need to completely purge my web server on Ubuntu 12.04. I have tried sudo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin (which hopefully removes all of them). How do I completely purge all of them?

1
  • 4
    Reinstall the OS. If that's not an option, be specific about what you feel should be 'purged' that isn't already.
    – user143703
    Aug 15, 2013 at 3:07

1 Answer 1

11

First you have to remove Apache and all of it's dependencies.

apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin

and then

rm -rf /etc/apache2; rm -rf /etc/php5; rm -rf /var/lib/mysql; rm etc/mysql

And then reinstall.

If you have any issues with phpMyAdmin, try entering this into the Terminal:

dpkg-reconfigure phpmyadmin
2
  • do u knwo the equivalent commands in Mac?
    – mOna
    Mar 4, 2016 at 9:13
  • 2nd step have correction to removing MYSQL here is the correction rm -rf /etc/apache2; rm -rf /etc/php5; rm -rf /var/lib/mysql; rm -rf /etc/mysql; you forgot to add -rf and / into last command May 3, 2019 at 5:18

Not the answer you're looking for? Browse other questions tagged .