centos6.5 卸载php

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 ~]#

上一篇:(转)前端构建工具gulp入门教程


下一篇:make no mistake, we are the last line of defense.