2

I want to remove apache as if it was never installed, no config files left behind. I intend to reinstall apache2 fresh. I have tried various combinations of apt-get options to no success.

apt-get remove apache2
apt-get remove --purge apache2
apt-get purge apache2
apt-get autoremove apache2

None of these totally remove apache properly.

Nothing works, the /etc/apache2 directory still exists. So I deleted it. When I install apache the folder is never created.

Running Ubuntu server 10.10.

Benbob
  • 277
  • 1
  • 6
  • 19

3 Answers3

4

apache2 does not contain real config files. Try

dpkg --purge apache2-common

From its description:

Apache HTTP Server common files
<...>
This package contains the configuration and support scripts. <...>
Catherine
  • 484
  • 1
  • 3
  • 11
1

dpkg --purge apache2

raerek
  • 658
  • 7
  • 12
1
sudo apt-get remove --purge $(dpkg -l apache* | grep ii | awk '{print $2}') 
Jenny D
  • 27,780
  • 21
  • 75
  • 114
Rushabh
  • 11
  • 1