Uninstalling the Apache server frees valuable system resources. If you no longer need Apache you can uninstall it from your system using these simple steps
These commands apply to Debian, Ubuntu and other Ubuntu-based Linux distributions such as Linux Mint, Elementary OS, Linux Lite, Zorin Os etc.
Remove Apache
Follow these steps to remove Apache2 service using the terminal
First, stop the Apache2 service if it is running with
sudo service apache2 stop
Now remove and clean up 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
Use the auto remove command to get rid of other dependencies
sudo apt-get autoremove
Check whether there are any other configuration files that have not been removed using this command:
whereis apache2
It should return
apache:
If you get the following output
apache: /etc/apache2
Remove the directory and existing configuration files using
sudo rm -rf /etc/apache2
Confirm Apache Has Been Removed
You can run the following commands to confirm Apache has been removed
which apache2
It should return a blank line
Alternatively, you can start the server using this command
sudo service apache2 start
It should return the following output
Failed to start apache2.service:Unit apache2.service not found
If you change your mind, you can always install Apache using my simple tutorial here.
Nice work let me just do it then install it again
ReplyDeleteHaha, let me know how that goes
Deleteam gonna give this a try mostly to reset my apache
ReplyDeleteLemi know if it works
Delete