0

How to uninstall apache2 ?

I needed to install phpmyadmin, but it got errors so i decided to uninstall it and reinstall mysql php and apache.

But I am unable to uninstall apache.

I uninstalled it the following way:


$ whereis apache

$ apache:

$ which apache

$

still I'm getting "Ubuntu Logo Apache2 Ubuntu Default Page" at localhost

2
  • 1
    Please share complete information, what's de output for apt-get remove apache, also please follow good questions recomendations Jul 12, 2018 at 14:12
  • 1
    Hi Anup and welcome to askubuntu! What do you want to state in the last lines of your post; it is absolutely confusing! Please add the output of the commands to your post. Further post the output of the following command: apt list --installed | grep apache .
    – abu_bua
    Jul 12, 2018 at 14:35

1 Answer 1

1

Apache has commands in post-installation to drop a 'default' page into /var/www/html if there's not already content in that directory. Other web servers like NGINX in the repos have a similar configuration step.

If you remove /var/www/html/*.html you should be able to get rid of the 'default' index page. You can alternatively just erase that directory if you wish, but it's your choice which of these you do.

That index page though it was originally Apache installed doesn't mean Apache is still installed - if pidof apache2 doesn't return anything then Apache is not installed and the file is a leftover left in place by the package, and can be safely removed.

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