How to uninstall PHP on Centos 8

  • Last update: Apr 3, 2024
  • Views: 206
  • Author: Admin
How to uninstall PHP on Centos 8

Hello colleagues.

In today's article, we'll talk about how you can quickly and safely remove the PHP interpreter from your Linux server.

Removing PHP from the server may be necessary in many cases, one example is if you want to switch to the python language, and therefore you no longer need PHP on the server so as not to waste the resources of the server itself. In our case, we will be showing PHP removals on the Centos 8 Stream operating system.

 

And so, before deleting anything, let's first find all the php packages that are currently installed on your server. To search for a package, we will use the command in the console:

$. yum list installed | grep php*

php delete

In our case, we have only 4 packages installed that are related to PHP, and you can have many more packages.


 

After we have found all the packages, we can now remove php with all dependencies with a simple command:

$. dnf remove php*

php delete

We confirm the deletion with the Y key, after which php will be successfully deleted from your server.


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES

How to uninstall Apache on Centos 8
Installing Apache Web Server on CentOS 8
How to Install Nginx on CentOS/Redhat