How to Remove Apache2 from Ubuntu 15.04 Completely

To uninstall apache, run the following commands:
[sourcecode]
sudo service apache2 stop
sudo apt-get remove –purge apache2 apache2-utils apache2.2-bin apache2-common -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
[/sourcecode]

Find the apache2 configuration directories and files using command:
whereis apache2

Then, delete the apache2 binary with this command:
[sourcecode]
sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2
[/sourcecode]

Scroll to Top