This question already has an answer here:

I need to completely remove apache2 but no matter what I do I still get the default ubuntu page and when I run a nodejs app it will say port 80 is in use.

I tried the usual suggested in other apache2 removal questions:

sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove

rm -rf /usr/sbin/apache2
rm -rf /etc/apache2

$ sudo lsof -i :80

chrome  2426 physiii  184u  IPv4  31202      0t0  TCP desktop:54128-> (ESTABLISHED)
chrome  2426 physiii  248u  IPv4  27504      0t0  TCP desktop:54038-> (ESTABLISHED)
chrome  2426 physiii  258u  IPv4  27510      0t0  TCP desktop:33542-> (ESTABLISHED)

I still get "Apache2 Ubuntu Default Page" if I go to

What is going on?

marked as duplicate by David Foerster, Zanna, Kevin Bowen, muru, Peachy Mar 1 '17 at 8:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Did you reboot? – Organic Marble Feb 27 '17 at 2:45
  • 1
    Edit your post to include the output of sudo lsof -i :80, please. – muru Feb 27 '17 at 5:53
  • Note: sudo in sudo lsof -i :80. – muru Feb 27 '17 at 14:40
  • Just noticed that :) updated. – physiii Feb 27 '17 at 14:43
  • Something's clearly changed - your older output had a connection to localhost, which is no longer present. Do you still have something running on port 80? I doubt it. – muru Feb 28 '17 at 5:45

In my case, these commands helped me to fully remove apache2.

$ sudo apt-get remove apache2*
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo rm -rf /etc/apache2 /var/lib/apache2 /var/lib/apache2
  • 1
    Still there. I'm using 16.04 – physiii Feb 27 '17 at 3:36
  • After the page loads to default apache page. Refresh it again. – Siraj Alam Feb 27 '17 at 3:46
  • 2
    Nope. I can't start a program on port 80. Apache is still binding that port somehow! – physiii Feb 27 '17 at 4:16

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