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?

2
  • 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 5, 2012 at 14:51
  • 3
    try execute dpkg --get-selections | grep apache and show output
    – B14D3
    Jan 5, 2012 at 14:53

2 Answers 2

1

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

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.

2
  • How can I find what I should append to apache2-mpm- ?
    – Mikkel Rev
    Jan 5, 2012 at 16:34
  • @MariusJonsson As B14D3 said, check your current selections to find installed packages to remove. Jan 5, 2012 at 16:53

You must log in to answer this question.

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