Ubuntu – apt-get does not remove initscript

aptinit.dremoveUbuntuubuntu-10.04

This day I tried to remove apache2. It's bundled with Ubuntu Lucid, which I don't need. I used apt-get remove apache2 to remove it. But somehow, the initscript was still there, in "/etc/init.d/". I tried the apt-get purge command, but the result was the same.

How come the apt-get command fails not remove initscript, even though the script was made by apache2 package.

Best Answer

The exact owner of the init script is apache2.2-common, not the apache2. The apt-get purge apache2 command will purge the apache2 package but only remove apache2.2-common as its dependency. You should name all packages you want to purge to actually purge them or use the reciept from https://serverfault.com/a/326306/52873.