I am having some wierd issues with Apache2 server on my ubuntu server. I believe some configuration files may have been tampered with. What is the easiest way to remove apache2 completely from my server. I am aware of how to install by using

sudo apt-get install apache2

but, I just want to make sure I completely remove apache2.

link|improve this question

25% accept rate
feedback

2 Answers

up vote 2 down vote accepted

sudo apt-get --purge remove apache2e

apt-get remove apache2-common

link|improve this answer
feedback

Start with:

sudo apt-get remove --purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove

If you manually modified or installed stuff, apt might not remove it. Check what's left:

whereis apache2

Have a look whats inside these directories, and if you're confident you want to trash it, manually remove the directories. In my case:

sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.