CentOS / RHEL 5/6: Uninstall Apache (HTTPD) Server

To uninstall the Apache (HTTPD) server on CentOS or Red Hat Enterprise Linux (RHEL) 5/6, you can use the following steps:

  1. Stop the Apache service:
service httpd stop
  1. Remove the Apache packages:
yum remove httpd

This will remove the Apache packages and all of its dependencies from your system.

  1. Remove any leftover Apache configuration files:
rm -rf /etc/httpd
  1. Verify that Apache has been completely removed by running the following command:
yum list installed | grep httpd

If the command returns no output, Apache has been successfully uninstalled from your system.

Leave a Comment