Uninstall apache from CentOS
Check whether there is any built-in Apache Software in the system. The command is as follows:
Reference [root @ localhost local] # rpm-qa | grep httpd
Httpd-2.2.3-43.el5.centos
Note: The rpm-qa | grep httpd command is used to list apache-related packages. In the preceding example, the rpm package list of apache is installed by default in Linux, the list listed in other Linux versions may be different, but don't worry. Whatever it is, the uninstallation starts from the bottom package until the first package is detached.
Uninstall the httpd-2.2.3-43.el5.centos as follows:
Reference [root @ localhost local] # rpm-e httpd -- nodeps
(Generally, there is no need to include a version number. For example, you can directly write it as rpm-e httpd)
Note: If the package dependency cannot be detached, the system will usually prompt the package dependency, and list the dependent package names. Uninstall the dependent package first.