Centos7 completely remove PHP

View php version command:

#php -v

The following command to delete unclean

#yum remove php

Since then later use this command

#php -v

There will still see the version information. . . . .

 

Must force the removal, use the following command to see all the php package

#rpm -qa | grep php

Tips are as follows:

#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 does not rely on first uninstall

pdo mysql dependency is; Common gd dependency is;
for example: # PHP RPM -e-pdo-5.1.6-27.el5_5.3
error: the Failed Dependencies:
        PHP needed by IS-pdo (Installed) PHP-mysql -5.1.6-27.el5_5.3.i386

Therefore, the correct unloading 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 

Then

# php -v

Guess you like

Origin www.cnblogs.com/peteremperor/p/11073664.html