Remove LAMP in Ubuntu
The most popular post on this site is the one showing how to install a LAMP server on Ubuntu. Once you're done developing your websites on your computer, you may want to remove the LAMP server from your Ubuntu installation. Actually, you probably want to leave the Linux part and only remove the AMP part, (Apache, MySQL, php).
I've done a post previously that shows how to do this in several steps, but I wanted to come up with a more automated way. So I came up with this one-liner that will remove Apache, MySQL, php, and phpMyAdmin from your Ubuntu system.
Warning: this command will uninstall the packages from your system without asking for confirmation.
If you're a bit unsure about doing this and you only want to see a list of packages that will be removed, just leave off the end portion from the last pipe onward, like this.