Remove Apache2

If you want to remove Apache2 completely, here's how you do it:

First stop the apache2 service if it is running with:

$ sudo service apache2 stop

Now remove and cleanup all the apache2 packages with:

$ sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common

Finally, just in case any other cleanup in needed run:

$ sudo apt-get autoremove 

You can do the following two tests to confirm apache has been removed:

$ which apache2 - should return a blank line
$ sudo service apache2 start - should return apache2: unrecognized service