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

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

To uninstall the Apache HTTP server on CentOS or Red Hat Enterprise Linux (RHEL) 5 or 6, follow these steps:

  1. Stop the Apache HTTP server by running the following command:
service httpd stop
Source:ww‮uttual.w‬ri.com
  1. Remove the Apache HTTP server package by running the following command:
yum remove httpd
  1. Remove any remaining Apache-related configuration files. These are typically stored in the /etc/httpd directory. You can remove them using the rm command:
rm -rf /etc/httpd
  1. Remove any Apache-related log files. These are typically stored in the /var/log/httpd directory. You can remove them using the rm command:
rm -rf /var/log/httpd
  1. Remove any Apache-related runtime data. This is typically stored in the /var/run/httpd directory. You can remove it using the rm command:
rm -rf /var/run/httpd
  1. 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.

  2. 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.

Created Time:2017-10-27 14:56:36  Author:lautturi