Skip to content

Instantly share code, notes, and snippets.

@funky-monkey
Created October 19, 2021 11:54
Show Gist options
  • Save funky-monkey/630b90b051f62ead7ca2791255e71f38 to your computer and use it in GitHub Desktop.
Save funky-monkey/630b90b051f62ead7ca2791255e71f38 to your computer and use it in GitHub Desktop.

A very simple and straightforward way that worked for me is as follows:

Stop apache2.

sudo service apache2 stop

Uninstall Apache2 and its dependent packages.

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

Use autoremove option to get rid of other dependencies.

sudo apt-get autoremove

Check whether there are any configuration files that have not been removed.

whereis apache2

If you get a response as follows apache2: /etc/apache2 remove the directory and existing configuration files.

sudo rm -rf /etc/apache2

Source: How to uninstall and remove Apache2 on Ubuntu or Debian by Dan Nanni

https://installlion.com/ubuntu/xenial/main/a/apache2/uninstall/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment