As we all know, CentOS 8 had reached its EOL on the 31st of December 2021. Now CentOS is itself moving from being downstream to RHEL release to an upstream development branch of RHEL.
Upstream vs downstream
CentOS Linux is a rebuild of Red Hat Enterprise Linux (RHEL). As such, it is downsteam from RHEL. CentOS Linux release version numbers reflect the date of the RHEL release on which they are based.
CentOS Stream, on the other hand, is the upstream, public development branch for RHEL. Specifically, CentOS Stream 8 is the upstream for the next minor release of RHEL 8, CentOS Stream 9 for the next minor release of RHEL 9, and so on.
Upgrading from CentOS 8 to CentOS 8 stream
Please refer to our complete step by step guide on how to upgrade from CentOS 8 to CentOS 8 Stream.
Downgrading from CentOS 8 stream to CentOS 8
As mentioned above, CentOS 8 stream is the upstream for the next minor release of RHEL 8. So, what if there is something that you need as a mandatory feature, which is missing in CentOS 8 Stream and don’t find it?
Follow these steps to downgrade from CentOS 8 stream to CentOS 8.
1. Check the current version of CentOS
sudo cat /etc/os-release
2. Remove the centos-stream package
sudo dnf remove centos-stream-release
You will recieve a message like “Problem: The operation would result in removing the following protected packages: setup”
So take a backup of your current yum setup and re-run the command
sudo dnf remove centos-stream-release
3. Copy the repository files from a new CentOS 8 installation to /etc/yum.repos.d/ . You can download it from here.
4. Resync the CentOS 8 distro
sudo dnf distro-sync --releasever 8
5. Finally reboot the server
reboot
6. Welcome back to CentOS 8. Check the current version of CentOS
sudo cat /etc/os-release
And you are moved back to CentOS 8 🙂
Dave
Hello,
Are there steps to complete Step 2: backup of current yum setup?
I have attempted several methods to try this, but still get the same error as noted.
Nishant Kaushal
You could simply run the below command…
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
Dave
On some research would the command be something like this to achieve a backup that would allow the error to proceed?
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
Nishant Kaushal
Yep, your command is correct. You could also simply rename the directory to CentOS-Base.repo.bak using the same command, simply replacing “cp” with “mv”