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.
Videos
Software collections (SCL) are designed for parallel installation beside the system default version, thus allowing to run multiple versions simultaneously.
This is described in PHP Configuration Tips, especially the switch to FPM for httpd users (as mod_php, used by default in CentOS 7), allow only a single version). Nginx users always use FPM.
In remi repository you can find PHP 5.6 to 8.0 as SCL.
For a proper installation, follow the wizard instructions (and choice "multiple versions").
I had a similar goal, and went a slightly different way:
I wanted to be able to test with newer versions of PHP as well as the production version, and run testcases against them.
Code centric Development environment
I started by using vagrant, which basically is a way of provisioning your VMs. the configuration is in code, in form of a VagrantFile. I liked the way this allowed me to set up completely equal environments, and bracnh off to test new versions of PHP without changing the rest of the system. The way I set it up, it basically maps your src folder to the vm, and you are off.
This also meant that any developer checking out the code will be able to spin up a development environment which is exactly the same as the one all the other developers are using.
Going further
This is a further development of the scenario I have described, and is essentially an alternative route
After some iterations, and a desire to automate the testing, which meant spinning up a test environment when I needed to test, with the same specs as my prod environment, I decided to move to docker. the overhead is less, and it appears that docker is easier to run on different OSes, so essentially I did the same sort of thing in docker, which means that setting up CI/CD is easy since a lot of those tools have docker integrations built in.
You should be able to achieve this with yum downgrade. The command in your case should be something like
yum downgrade php
which will give you the actions that yum will do and the option to proceed. You may have to do
yum --disablerepo remi-php71 downgrade php
if the first command doesn't show a downgrade path.
As always, test this before doing it on a production machine.
You could try to check yum history with yum history command. If you find step, where you install PHP7.1 instead of PHP7.0, you could revert it by yum history undo <Step ID>.
Generally, it is not good practice to mix and match different repositories. Anyway, try the following:
- with the
remirepo enabled, do ayum remove php*(pay big attention to the list of to-be-removed packages to be sure no critical packages are uninstalled) - disable the
remirepo and enable theatomicone - do a
yum install php - restart apache with
service httpd restart
When php 5.5 is install from "remi-php55" repository, simpler way is to update to php 5.6 from "remi-php56", following the wizard:
yum-config-manager --disable remi-php55
yum-config-manager --enable remi-php56
yum update