Forked from UbuntuEvangelist/Completely Uninstall LAMP Stack Ubuntu 24.04 LTS
Created
July 22, 2020 11:20
-
-
Save Marinski/479fea58d3a4ee65d8a694ba5ed6e26f to your computer and use it in GitHub Desktop.
Completely Uninstall LAMP Ubuntu 18.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This will remove Apache | |
sudo service apache2 stop | |
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common | |
sudo apt remove apache2.* | |
sudo apt-get autoremove | |
whereis apache2 | |
sudo rm -rf /etc/apache2 | |
# This will remove PHP | |
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "\n" " "` | |
sudo apt-get purge php7.* | |
sudo apt-get autoremove --purge | |
whereis php | |
sudo rm -rf /etc/php | |
# This will remove MYSql | |
sudo service mysql stop | |
sudo apt-get remove --purge *mysql\* | |
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y | |
rm -rf /etc/mysql | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
sudo reboot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment