Rate This Document
Findability
Accuracy
Completeness
Readability

Uninstalling Apache

Uninstallation Against Source Code Compilation

During source code compilation and installation, only the corresponding files are generated. Therefore, you can directly delete the corresponding directories and view the deletion result.
1
2
rm -rf /usr/local/apache2
ls /usr/local/apache2

Uninstallation Against Installation from the Mirror Site

  1. Stop Apache.
    systemctl stop httpd
    ps -ef | grep httpd
  2. Query and uninstall Apache.
    1
    rpm -qa | grep httpd
    
    • On CentOS 7.6:
      1
      rpm -e --nodeps httpd-2.4.39-3.el7.aarch64
      
    • On CentOS 8.1:
      rpm -e httpd-2.4.39-1.el8.aarch64
      rpm -e httpd-tools-2.4.39-1.el8.aarch64
  3. If no information is displayed, Apache has been uninstalled.
    1
    rpm -qa | grep httpd
    
  4. Delete the installation directory.
    1
    2
    rm -rf /usr/local/apache2
    ls /usr/local/apache2