Home >Backend Development >PHP Problem >How to uninstall php
If you want to uninstall PHP cleanly, use yum remove php directly. If the uninstallation is not clean, you can first check the installed rpm package directory, and then uninstall one by one in order.
Related recommendations: "PHP Tutorial"
1. First, check all php-related rpm packages installed on the machine.
[root@localhost nginx]# rpm -qa | grep php php55-php-pecl-zip-1.15.1-1.el7.remi.x86_64 php55-php-gd-5.5.38-7.el7.remi.x86_64 php55-runtime-2.1-5.el7.remi.x86_64 php55-2.1-5.el7.remi.x86_64 php55-php-pecl-jsonc-1.3.10-1.el7.remi.x86_64 php55-php-xml-5.5.38-7.el7.remi.x86_64 php55-php-5.5.38-7.el7.remi.x86_64 php55-php-common-5.5.38-7.el7.remi.x86_64 php55-php-process-5.5.38-7.el7.remi.x86_64 php55-php-mbstring-5.5.38-7.el7.remi.x86_64 php55-php-pear-1.10.5-2.el7.remi.noarch php55-php-cli-5.5.38-7.el7.remi.x86_64
2. Delete in dependency order.
rpm -e php55-php-pecl-zip-1.15.1-1.el7.remi.x86_64 rpm -e php55-php-gd-5.5.38-7.el7.remi.x86_64 rpm -e php55-runtime-2.1-5.el7.remi.x86_64 rpm -e php55-2.1-5.el7.remi.x86_64 rpm -e php55-php-pecl-jsonc-1.3.10-1.el7.remi.x86_64 rpm -e php55-php-xml-5.5.38-7.el7.remi.x86_64 rpm -e php55-php-5.5.38-7.el7.remi.x86_64 rpm -e php55-php-common-5.5.38-7.el7.remi.x86_64 rpm -e php55-php-process-5.5.38-7.el7.remi.x86_64 rpm -e php55-php-mbstring-5.5.38-7.el7.remi.x86_64 rpm -e php55-php-pear-1.10.5-2.el7.remi.noarch rpm -e php55-php-cli-5.5.38-7.el7.remi.x86_64
The above is the detailed content of How to uninstall php. For more information, please follow other related articles on the PHP Chinese website!