Home>Article>Operation and Maintenance> How to delete php in centos7

How to delete php in centos7

王林
王林 Original
2020-09-28 14:51:43 3670browse

How to delete php in centos7: 1. Execute the [rpm -qa | grep php] command to view php related software packages; 2. Execute the [rpm -e] command to delete the php software package; 3. Execute [php - v] command to check whether the deletion is completed.

How to delete php in centos7

Check the php version command:

(Recommended tutorial:centos tutorial)

#php -v

below The command is not clean to delete

#yum remove php

because after using this command

#php -v

you will still see the version information.

Must be forcibly deleted, use the following command to view all php packages

#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

Be careful to uninstall those without dependencies first.

pdo is a dependency of mysql; common is a dependency of gd;

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

So the correct 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

then Use

# php -v

to check the version information. There is no prompt anymore and the deletion is successful.

Related recommendations:php training

The above is the detailed content of How to delete php in centos7. 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