Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I remove apache from my server?I'm using Ubuntu 9 64bit, the apache2 came preinstalled.

share|improve this question

4 Answers 4

up vote 1 down vote accepted

A command like this may get rid of everything.

dpkg --get-selections | grep apache | xargs apt-get --yes apt-get purge

You probably should run dpkg --get-selections | grep apache this command first to see the list of packages that will be uninstalled so you can be sure the grep is selecting the right things.

share|improve this answer

As root (or via sudo): $ apt-get remove apache2

share|improve this answer
    
Nope, doesn't work –  Uffo Mar 7 '10 at 20:54
8  
Why "doesn't it work"? Do you get an error message? –  EEAA Mar 7 '10 at 20:56
sudo /etc/init.d/apache2 stop
sudo apt-get --purge remove apache2
share|improve this answer

this worked for me: aptitude purge ~i~napache

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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