1

I have failed to remove apache2 from my ubuntu server.

I did $ sudo apt-get --purge remove apache2 and $ sudo apt-get remove apache2 and $ sudo apt-get autoremove and when I tried to do $ sudo apt-get --purge remove apache2-utils I get dependency error.

After I did the above steps I could still do $ sudo service apache2 restart. The server restarts as normal. The www dir is still there intact. This tells me that apache2 was not removed.

How can I get rid of it?

Kenny Rasschaert
  • 8,925
  • 3
  • 41
  • 58
Mikkel Rev
  • 147
  • 7
  • 1
    /var/www will not be removed with removing apache, because its not part of instalation only directory with your site. If you tried apt-get remove and apache still starting then maybe it wasnt installed with apt but compiled from source – B14D3 Jan 05 '12 at 14:51
  • 3
    try execute `dpkg --get-selections | grep apache` and show output – B14D3 Jan 05 '12 at 14:53

2 Answers2

1

You can always avoid *-common and *-bin inflation by running apt-get --purge remove apache2*

Tim
  • 2,997
  • 16
  • 15
0

The apache2 package isn't the web server at all; it only contains a few files:

/usr/share/bug/apache2/control
/usr/share/bug/apache2/script
/usr/share/doc/apache2

If the autoremove didn't do it, then get rid of apache2.2-common, apache2.2-bin, and apache2-mpm-_____ for whichever MPM you're using. And even that is not going to delete your /var/www directory.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248