Skip to content

Instantly share code, notes, and snippets.

@pronata
Last active January 28, 2022 06:35
Show Gist options
  • Save pronata/2ce397ef190a15977698af6784692785 to your computer and use it in GitHub Desktop.
Save pronata/2ce397ef190a15977698af6784692785 to your computer and use it in GitHub Desktop.
How to remove apache2 on ubuntu
$ whereis apache2
apache2: /usr/sbin/apache2 /usr/lib/apache2 /etc/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz
$ which apache2
/usr/sbin/apache2
$ sudo systemctl stop apache2
$ sudo systemctl disable apache2
$ sudo dpkg --get-selections | grep apache | cut -f 1
$ sudo apt-get remove --purge ...
$ sudo apt-get autoremove
$ sudo rm -rf /etc/apache2/
$ sudo rm /etc/systemd/system/apache2.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment