How to swap PHP 8 for PHP 7.4 on CentOS 7?

Viewed 45

I accidentally installed php version 8.0.12 on CentOS 7 and it just doesn't want to remove. I tried with yum remove php but it says No Match for argument: php and No Packages marked for removal but on php -v it says PHP version 8.0.12 is running. How and why? And more importantly how to install desired 7.4 version of PHP?

1 Answers

The actual package name in yum can be a bit different than you might expect. If you execute yum list "php*" --installed you should be able to see the exact package name and version number installed which you can used in the yum remove command.

Related