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.

  • 1
    check if apache was really removed by "sudo dpkg -l | grep apache". – Khaled Nov 25 '10 at 9:17
  • Thanks, had to purge all the apache2 packages before it would uninstall. – Keyo Nov 25 '10 at 9:35
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. <...>
  • To list the files installed with "apache2.2-common", you can use "dpkg -L apache2.2-common". You can find apache configuration files in the list. – Khaled Nov 25 '10 at 10:06
  • @Khaled: well, is your comment for me or the OP? – whitequark Nov 25 '10 at 10:25
  • For anyone interested! :) – Khaled Nov 25 '10 at 10:28
1

dpkg --purge apache2

1
sudo apt-get remove --purge $(dpkg -l apache* | grep ii | awk '{print $2}') 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.