7

I had Debian 5 installed on my VPS but I found that it came with apache2 already up and running. I tried

apt-get remove apache2

but it said that apache2 wasn't running. I checked top and yep, there it was. So then I turned it off.

/etc/init.d/apache2 stop

which worked fine and shut the daemon down. However, I still can't remove it. I tried aptitude remove but it says that it isn't installed.

What is going on?

4 Answers 4

14

Try apt-get remove apache2-utils.

In Debian 5, Apache is split into multiple packages:

  1. apache2
  2. apache2-mpm-prefork (or apache2-mpm-worker or apache2-mpm-event)
  3. apache2.2-common
  4. apache2-utils

There are interdependencies: (1) depends on (2), which depends on (3), which depends on (4). Therefore, removing (4) causes all of them to be removed. (The apache2 package doesn't contain much in itself; it just exists so that you can do apt-get install apache2 to conveniently install all of those packages.)

2
  • Ah, perfect! Cleaned it right up.
    – Xeoncross
    Sep 22, 2010 at 22:11
  • I can verify that this applies to Debian 6, too. Oct 16, 2012 at 17:04
0

Most probably your VPS didn't came with Apache installed via apt-get. See if you can find the binaries in /usr/local, which is a telltale sign of it being compiled from source.

I can't find a good reason for doing this... and I don't like the sound of it...

0

If you're unable to remove the package via apt or synaptic, it's likely that apache was (for some unforesaken reason) installed from a binary tarball or possibly from source. In this case, there's probably not much you can do aside from manually deleting the files associated with apache.

0

The best way to remove everything apache related is to run

apt-get remove apache2*

You must log in to answer this question.

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