Home  >  Article  >  Backend Development  >  How to uninstall php installed by yum

How to uninstall php installed by yum

王林
王林Original
2020-08-29 14:10:554535browse

How to uninstall php installed by yum: 1. Check the php version; 2. Execute the [rpm -qa | grep php] command for forced deletion; 3. Execute the [rpm -e php dependency] command to uninstall the dependencies. Can.

How to uninstall php installed by yum

Specific method:

(Recommended tutorial: php video tutorial)

Check PHP first Version

#php -v

Then perform forced deletion

#rpm -qa|grep php

The prompts are as follows:

#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

Note: Uninstall those without dependencies first. pdo is a dependency of mysql; common is a dependency of gd;

(Related recommendations: php training)

For example:

# 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 The uninstallation sequence is:

# 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

Just wait for the uninstallation to complete.

The above is the detailed content of How to uninstall php installed by yum. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn