Stack Exchange network consists of 180 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I uninstall Apache2 on Ubuntu 14.04, from the terminal? I don't know the commands.
sudo apt-get sudo apt-get remove apache2
This would do what you want
sudo apt-get remove apache2*
If you just want to remove apache use:
sudo apt-get remove apache2
Though if you don't intend to reinstall at some point and would like to remove all of apache's configuration files then use:
sudo apt-get purge apache2