If you want to uninstall PHP cleanly, you cannot directly use the yum remove command. You need to check how many rpm packages there are, and then uninstall them one by one in the order of dependencies.
1. First check all PHP-related rpm packages installed on the machine
[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. Delete them in order of dependencies
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
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to check whether PHP has been completely uninstalled. For more information, please follow other related articles on the PHP Chinese website!