WARNING – THIS WILL REMOVE WITHOUT PROMPT
dpkg -l *apache* *php* *mysql* phpmyadmin | grep ^ii | awk '{ print $2}' | xargs sudo apt-get -y purge --auto-remove
rm -r /etc/apache2
rm -r /etc/php5
rm -r /etc/mysql
sudo apt-get --assume-yes purge apache* php* mysql* phpmyadmin
sudo apt-get --assume-yes autoremove
sudo apt-get --assume-yes update && sudo apt-get --assume-yes upgrade && sudo apt-get --assume-yes check && sudo apt-get --assume-yes autoremove && sudo apt-get --assume-yes autoclean && sudo apt-get --assume-yes clean
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.
Related