View all php packages
#rpm -qa|grep php
Output the following content:
#php-pdo-5.1.6-27.el5_5.3 #php-mysql-5.1.6-27.el5_5.3 #php-xml-5.1.6-27.el5_5.3 #php-cli-5.1.6-27.el5_5.3 #php-common-5.1.6-27.el5_5.3 #php-gd-5.1.6-27.el5_5.3
Note: Uninstall those without dependencies first software package.
pdo is a dependency of mysql; common is a dependency of gd;
For example:
# rpm -e php-pdo-5.1.6-27.el5_5.3 error: Failed dependencies: php-pdo is needed by (installed) php-mysql-5.1.6-27.el5_5.3.i386
So the correct uninstallation sequence is:
# rpm -e php-mysql-5.1.6-27.el5_5.3 # rpm -e php-pdo-5.1.6-27.el5_5.3 # rpm -e php-xml-5.1.6-27.el5_5.3 # rpm -e php-cli-5.1.6-27.el5_5.3 # rpm -e php-gd-5.1.6-27.el5_5.3 # rpm -e php-common-5.1.6-27.el5_5.3
Finally execute the following command to view the php version information
# php -v
If no version information is output, it means that it has been completely uninstalled.
Recommended tutorial: centos tutorial
The above is the detailed content of How to completely uninstall php on centos. For more information, please follow other related articles on the PHP Chinese website!