1、刪除php,刪除之前需要查看php依賴包,使用 rpm -qa|grep php
[root@localhost ~]# 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
刪除需要按依賴順序進行刪除,否則會報錯,如下:
[root@localhost ~]# 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
[root@localhost ~]# rpm -e php55w-mysql-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-xml-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-pdo-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-xmlrpc-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-gd-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-cli-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-imap-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-odbc-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-ldap-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-pdo-5.5.38-1.w6.x86_64
[root@localhost ~]# rpm -e php55w-common-5.5.38-1.w6.x86_64
刪除完畢,在使用命令看還有么,如果沒有,表明刪除完了。
[root@localhost ~]# rpm -qa|grep php
[root@localhost ~]#