How to uninstall PHP on Centos 8
- Last updated: Nov 3, 2023
- Views: 939
- Author: Admin
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*
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*
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.