apache2 is a meta-package that just selects other packages. If you installed apache by installing that package, you just need to run this to clean up the automatically selected packages:#stop the apache2 service
$ sudo systemctl stop apache2
#r emove apache2 packages
$ sudo apt-get purge apache2*
# cleanup
$ sudo apt-get autoremove
# check if the apache has been removed:
#1- following command line should return a blank line
$ which apache2
# If it return a location
apache2: /etc/apache2
# Remove the location
sudo rm -rf /etc/apache2
# 2- following command line should return apache2:
# Failed to start apache2.service: Unit apache2.service not found.
$ sudo systemctl start apache2


0 Comments