The method to uninstall php under Linux is: 1. Execute the [rpm -qa|grep php] command to view the software package; 2. Execute [rpm -e php-mysql-5.1.6-27.el5_5.3 ] command to uninstall; 3. Execute the [php -v] command to check whether it is completely uninstalled.
Specific method:
(Recommended tutorial: php tutorial)
1. First execute Use the following command to find all php software packages
#rpm -qa|grep php
You can see the following content:
#php-pdo-5.1.6-27.el5_5.3 #php-mysql-5.1.6-27.el5_5.3 #php-xml-5.1.6-27.el5_5.3 #php-cli-5.1.6-27.el5_5.3 #php-common-5.1.6-27.el5_5.3 #php-gd-5.1.6-27.el5_5.3
2. Then we can uninstall all these software packages
Note: You need to uninstall the ones without dependencies first.
Example:
pdo is a dependency of mysql; common is a dependency of gd;
# rpm -e php-pdo-5.1.6-27.el5_5.3 error: Failed dependencies: php-pdo is needed by (installed) php-mysql-5.1.6-27.el5_5.3.i386
Correct uninstallation sequence:
# rpm -e php-mysql-5.1.6-27.el5_5.3 # rpm -e php-pdo-5.1.6-27.el5_5.3 # rpm -e php-xml-5.1.6-27.el5_5.3 # rpm -e php-cli-5.1.6-27.el5_5.3 # rpm -e php-gd-5.1.6-27.el5_5.3 # rpm -e php-common-5.1.6-27.el5_5.3
3. Finally Check to see if it has been completely uninstalled
# php -v
The above is the detailed content of How to uninstall php under linux. For more information, please follow other related articles on the PHP Chinese website!