To cleanly uninstall Apache2 and its configuration files from Ubuntu, stop the service first, then use apt purge followed by autoremove. Run the following commands in your terminal: [1]
bash
sudo systemctl stop apache2
sudo apt purge apache2 apache2-utils apache2-bin apache2.2-common
sudo apt autoremove
sudo rm -rf /etc/apache2 /var/lib/apache2 /var/log/apache2
Use code with caution.
Would you like assistance with configuring a different web server (like Nginx) or are you looking to do a fresh reinstall of Apache?
0 Comments