It is advisable to regularly upgrade your Linux system to avail latest updates, security patches and improvements. But sometimes an upgrade can cause some of your applications to stop working. In such cases you may need to downgrade RHEL/CentOS to previous release. There are two types of upgrades – one is upgrading to a next major release and the other is upgrading to the next minor release. Similarly, there are two types of downgrades – one is downgrading a major release to next major release and the other is downgrading a minor release to next minor release. In this article, we will learn how to downgrade RHEL/CentOS to previous minor release.
In a minor version release, there are no new features and software, but only fixing of existing problems and improvement of existing system performance. You can follow these steps to downgrade within the same major version (e.g. 7.6 to 7.5) but not across major versions (e.g. 7.0 to 6.9).
How to Downgrade RHEL/CentOS to Previous Minor Release
We will learn how to downgrade from CentOS 7.6 to 7.5 for kernel version 3.10.0-862. Before you proceed, it is important to understand that each minor release in RHEL/CentOS is compatible with only a given set of kernels. So it is necessary that your system has the compatible kernel version before your downgrade your Linux. Otherwise it will lead to software incompatibility issues.
1. Check Kernel Version
Open terminal and check kernel version installed on your system with the following command.
# yum list kernel-3.10.0-862*
If the above command’s output shows that the kernel is not installed, run the following command to install it.
# yum install kernel-3.10.0-862.el7
2. Reboot System
Once the kernel installation is complete, you need to reboot your system to apply changes.
3. Downgrade RHEL/CentOS
Next, run the yum downgrade command to downgrade your RHEL/CentOS. It will downgrade your Linux to the immediate minor version. For example, if it is 7.6 it will be downgraded to 7.5, if it is 7.5 it will be downgraded to 7.4.
# yum downgrade redhat-release
4. Confirm Downgrade
Lastly, confirm the downgrade with the following command.
# cat /etc/redhat-release
In this article, we have learnt how to downgrade RHEL/CentOS system to the immediately previous minor version. You can use these steps to downgrade RHEL/CentOS/Fedora/SUSE Linux systems. If you want to downgrade to two previous minor versions (7.6 to 7.4) just run the yum downgrade command twice, as long as the kernel version is compatible with it. Here is a list of all minor releases and their associated kernel versions.
If you find that your kernel is not compatible with the minor version, then install the compatible kernel first and then run the yum downgrade command. Again please note, these steps only allow you to downgrade from one minor release to another (e.g. 7.6 to 7.5) in the same major version (e.g. 7.0). It will not allow you to downgrade from one major version to another.
Also read:
How to Mount Windows Partition in Ubuntu
Top Hex File Editors in Linux
How to Setup 2 Factor Authentication for SSH
How to Delete All Text in File Using Vi Editor
How to Edit Hex File in Linux
Sreeram has more than 10 years of experience in web development, Python, Linux, SQL and database programming.