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:
- Stop the Apache service:
service httpd stop- Remove the Apache packages:
yum remove httpdThis will remove the Apache packages and all of its dependencies from your system.
- Remove any leftover Apache configuration files:
rm -rf /etc/httpd- Verify that Apache has been completely removed by running the following command:
yum list installed | grep httpdIf the command returns no output, Apache has been successfully uninstalled from your system.
