Home >Operation and Maintenance >Apache >How to uninstall apache on ubuntu

How to uninstall apache on ubuntu

藏色散人
藏色散人Original
2019-12-13 16:23:147586browse

How to uninstall apache on ubuntu

How to uninstall apache on ubuntu?

Installation and uninstallation of apache2 in ubuntu

1: Install apache2

Installation command: sudo apt-get install apache2

Start/stop/restart apache2: service apache2 start/stop/restart

2: Uninstall apache2

(1) The apache2.conf configuration file cannot be found after uninstalling and reinstalling. Test it and use the following method to uninstall it.

    $ sudo apt-get --purge remove apache2
    $ sudo apt-get --purge remove apache2.2-common
    $ sudo apt-get autoremove

(2) (Key step) Find the configuration files that have not been deleted and delete them together

    $ sudo find /etc -name "*apache*" -exec rm -rf {} \;
    $ sudo rm -rf /var/www

Recommended learning: Apache Tutorial

The above is the detailed content of How to uninstall apache on ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to start apacheNext article:How to start apache