CentOS上PHP完全卸载


想把PHP卸载干净,直接用yum的remove命令是不行的,需要查看有多少rpm包,然后按照依赖顺序逐一卸载。 

 

1.首先查看机器上安装的所有php相关的rpm包

[root@localhost nginx]# rpm -qa | grep php

php-cli-5.3.3-22.el6.x86_64

php-pdo-5.3.3-22.el6.x86_64

php-gd-5.3.3-22.el6.x86_64

php-fpm-5.3.3-22.el6.x86_64

php-common-5.3.3-22.el6.x86_64

php-5.3.3-22.el6.x86_64

php-xml-5.3.3-22.el6.x86_64

php-pear-1.9.4-4.el6.noarch

 

 

2.按依赖顺序进行删除

rpm -e php-fpm-5.3.3-22.el6.x86_64

rpm-e php-pdo-5.3.3-22.el6.x86_64

rpm -e php-pear-1.9.4-4.el6.noarch

rpm-e php-cli-5.3.3-22.el6.x86_64

rpm -e php-5.3.3-22.el6.x86_64

rpm-e php-xml-5.3.3-22.el6.x86_64

rpm -e php-gd-5.3.3-22.el6.x86_64

rpm-e php-common-5.3.3-22.el6.x86_64



你可能感兴趣的:(CentOS上PHP完全卸载)