How to use yum in centos7 and how to delete php

02-05-2023

This article mainly introduces how to use yum and how to delete php in centos7. The content is detailed and easy to understand, and the operation is simple and fast. There will be something to gain, let's take a look at it together.

How to delete php in centos7 yum: 1. Check the PHP version through php-v; 2. Use rpm -qa|grep php to check the installed PHP related extensions ;3. Uninstall php by executing the yum remove php command.

CentOS7 completely uninstalls PHP

1 View PHP version

php-v< /p>

2 View installed PHP related extensions

rpm -qa|grep php

< /p>

3 Uninstall

yum remove php

4 Uninstall residual extension

Uninstall according to the information found in 2, for example:

yum remove -y php-pdo-5.1.6-27.el5_5.3

There is no information output until the command in step 2.

5 Uninstall php version information

Sometimes after following the above steps, php -v will still output version information.

This may be the residual PHP after compiling and installing. You need to search globally and delete the relevant files.

find / -name php

The content of this article on how to use yum in centos7 and how to delete php is introduced Here, thank you for reading! I believe that everyone has a certain understanding of how to use yum and how to delete php knowledge in centos7. If you want to learn more, please pay attention to the Yisu cloud industry information channel.

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us