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.

2
  • 1
    check if apache was really removed by "sudo dpkg -l | grep apache". Commented Nov 25, 2010 at 9:17
  • Thanks, had to purge all the apache2 packages before it would uninstall. Commented Nov 25, 2010 at 9:35

3 Answers 3

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. <...> 
3
  • 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. Commented Nov 25, 2010 at 10:06
  • @Khaled: well, is your comment for me or the OP? Commented Nov 25, 2010 at 10:25
  • For anyone interested! :) Commented Nov 25, 2010 at 10:28
1

dpkg --purge apache2

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.