To uninstall the Apache HTTP server on CentOS or Red Hat Enterprise Linux (RHEL) 5 or 6, follow these steps:
service httpd stopSource:wwuttual.wri.com
yum remove httpd
/etc/httpd
directory. You can remove them using the rm
command:rm -rf /etc/httpd
/var/log/httpd
directory. You can remove them using the rm
command:rm -rf /var/log/httpd
/var/run/httpd
directory. You can remove it using the rm
command:rm -rf /var/run/httpd
Remove any Apache-related modules that were installed as separate packages. You can use the yum list installed
command to list all installed packages, and then use yum remove
to remove any packages that are related to Apache.
Remove any Apache-related user accounts and groups. These are typically named apache
or httpd
. You can use the userdel
and groupdel
commands to remove these accounts and groups.
After completing these steps, the Apache HTTP server should be fully uninstalled from your CentOS or RHEL system.