Monday, July 6, 2015


After installing Apache Server using apt-get it can be quit difficult to remove all the packages that were installed together with Apache2. You can follow the following instructions to completely get rid of Apache2 Server.

1. Remove the apache server.

sudo apt-get --purge remove apache2


2. Now remove any remaining packages

a. Search whether there are any remains pakcages. To see this execute the following command

dpkg --get-selections | grep -v deinstall | grep apache*


This will give a simmilar output as following.

apache2-bin         install
apache2-data         install
apache2-utils         install
libapache2-mod-proxy-html install
libapache2-mod-svn install
libapache2-mpm-itk install
libapache2-svn install


b. Now you should remove each of these packages one by one as shown below.

 sudo apt-get --purge remove apache2-bin
sudo apt-get --purge remove apache2-data
sudo apt-get --purge remove apache2-utils              etc.


After completely removing each package you should be able to get rid of Apache2 server. You can confirm this by checking whether there are any services relevant to apache2.

e.g : sudo service apache2 start

The above command will give an error saying that the service is not available.

1 comment:

Subscribe to RSS Feed Follow me on Twitter!