How to Migrate from CentOS 8 to Rocky Linux 8

CentOS 8 Linux will be not supported by the end of the year December 31, 2021, and it is no more downstream fork of Red Hat Enterprise Linux 8 instead it will be shifting to an upstream build of Red Hat.

If you are looking for an alternative to CentOS 8, Rocky Linux is the best candidate because it is lead by Gregory Kurtzer, founder of the CentOS project.

Rocky Linux is a community enterprise operating system designed to be 100% binary compatible with Red Hat Enterprise Linux distribution.

Rocky Linux will be the downstream build (it receives patches and updates after the upstream vendor does) of Red Hat.

The Rocky Linux Development Team has developed a script that allows users to easily migrate from the current CentOS 8 to Rocky Linux 8.

In this guide, we will show you how to migrate from CentOS 8 to Rocky Linux 8 step by step.


It is always recommended to backup all important data from your CentOS system. This allows you to restore the data if something goes wrong during this migration activity.

Updating the system

Make sure all the packages are up-to date by running the below command:

$ sudo dnf update
$ sudo dnf upgrade

Checking current version of the CentOS 8 system.

$ cat /etc/*-release

CentOS Linux release 8.4.2105
NAME="CentOS Linux"
ID_LIKE="rhel fedora"
PRETTY_NAME="CentOS Linux 8"
CentOS Linux release 8.4.2105
CentOS Linux release 8.4.2105

After upgrade is completed, restart your system to make sure all changes have been applied including kernel changes.

$ sudo reboot

Downloading Rocky Linux Migration script

To download the migrate2rocky conversion script, run:

$ curl -O

Make the script executable.

$ chmod +x

To perform pre-check, run:

$ sudo bash -V

If there are no errors in the pre-check output, proceed to convert your system to Rocky Linux 8.

Starting Migration Process

Rocky Linux migration process is straight forward and running this script will automatically convert the existing CentOS 8 operating system to Rocky Linux 8.

As part of this migration process, this script first verifies the active CentOS 8 repositories and then converts these repositories into the Rocky Linux equivalent.

Next, it will find a list of system packages that correspondence to the CentOS Linux branding such as logos, backgrounds, release and license, and then replace it with Rocky Linux equivalent packages.

Also, this script install, uninstall, reinstall and upgrade the necessary packages that used to convert Rocky Linux 8.

This conversion would take some time to complete, and it depends on the speed of your internet connection.

$ sudo bash -r

Once the migration process has been completed, you should get the following output:

Run the following command to sync installed packages on your system.

$ sudo dnf distro-sync -y

Restart your system to apply the changes:

$ sudo reboot

Post reboot of your system, you can find the Rocky Linux operating system version using the below command:

$ cat /etc/os-release

Closing Notes

In this guide, we’ve shown you how to migrate from CentOS 8.4 to Rocky Linux 8.4

If you have any questions or feedback, feel free to comment below.

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *