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?
Asked
Active
Viewed 6.3k times
2

tjhorner
- 127
- 1
- 1
- 6
-
4Reinstall the OS. If that's not an option, be specific about what you feel should be 'purged' that isn't already. – Aug 15 '13 at 03:07
1 Answers
10
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

tjhorner
- 127
- 1
- 1
- 6

AngryWombat
- 499
- 3
- 6
-
-
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 – Dharit Soni May 03 '19 at 05:18