1、删除php,删除之前需要查看php依赖包,使用 rpm -qa|grep php
[[email protected] ~]# rpm -qa |grep php
php55w-mysql-5.5.38-1.w6.x86_64
php55w-common-5.5.38-1.w6.x86_64
php55w-odbc-5.5.38-1.w6.x86_64
php55w-gd-5.5.38-1.w6.x86_64
php55w-xmlrpc-5.5.38-1.w6.x86_64
php55w-pdo-5.5.38-1.w6.x86_64
php55w-imap-5.5.38-1.w6.x86_64
php55w-ldap-5.5.38-1.w6.x86_64
php55w-cli-5.5.38-1.w6.x86_64
php55w-xml-5.5.38-1.w6.x86_64
php55w-5.5.38-1.w6.x86_64
删除需要按依赖顺序进行删除,否则会报错,如下:
[[email protected] ~]# rpm -e php55w-pdo-5.5.38-1.w6.x86_64
error: Failed dependencies:
php55w-pdo(x86-64) is needed by (installed) php55w-mysql-5.5.38-1.w6.x86_64
php55w-pdo(x86-64) = 5.5.38-1.w6 is needed by (installed) php55w-odbc-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-mysql-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-xml-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-pdo-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-xmlrpc-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-gd-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-cli-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-imap-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-odbc-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-ldap-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-pdo-5.5.38-1.w6.x86_64
[[email protected] ~]# rpm -e php55w-common-5.5.38-1.w6.x86_64
删除完毕,在使用命令看还有么,如果没有,表明删除完了。
[[email protected] ~]# rpm -qa|grep php
[[email protected] ~]#