How Do I Completely Remove Apache2 from Ubuntu?

How Do I Completely Remove Apache2 from Ubuntu?
Contents

How do I completely remove apache2?

2 Answers

  1. First stop the apache2 service if it is running with: sudo service apache2 stop.
  2. Now remove and cleanup all the apache2 packages with: sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common //or sudo apt-get purge apache2 apache2-utils apache2-bin apache2.2-common.

How do I permanently disable Apache?

Stop Apache from Starting on Linux

  1. Open the terminal application.
  2. Login using ssh for remote server. …
  3. Use sudo systemctl disable httpd && sudo systemctl stop httpd on RHEL/CentOS/Oracle/Fedora Linux.
  4. Ubuntu/Debian users run sudo systemctl disable apache2 && sudo systemctl stop apache2 command.
Sophia Al-Mansoor
Author

Sophia Al-Mansoor

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.