How to easily upgrade from CentOS 7 to CentOS 8.1.x

The following are the instructions for upgrading from CentOS 7 to CentOS 8.

First we need to login as sudo

Update your system by using YUM:

Double-check you have the epel-release repository installed:

Install the yum-utils and rpmconf packages:

Resolve rpm packages and use option ‘N’ to keep the already installed version.

Cleanup orphaned packages:


Before switching to CentOS 8 – replace system packages and repositories with CentOS 8 equivalents. We will start by installing the DNF – rpm-based package manager.

Then we’ll remove the YUM manager:

Once done, let’s run a DNF based system update.

Now we can start installing the packages needed for CentOS 8.

The latest mirror can be found here:

At the time of writing the post, the latest is: CentOS 8.1-1.1911.0.9 from 2020 March 12.

Then we need to upgrade the EPEL repository:

Then we can clean up the temp files:


Now, let’s switch from CentOS 7 to CentOS 8.1. We’ll need to remove the old Linux kernel first. And remove any conflicting packages:

Next, start the CentOS 8 upgrade. Note, this will take up to 20 minutes depending on your connection speed, as approximately 840+ packages need to be downloaded, verified, cleaned and installed and some also removed.

Once done, you’ll see a screen like this:

Then we’re ready to install the new kernel core, which won’t take more than 20 seconds.

And run the CentOS 8 Minimal install:

When done, you’ll see a message that the process was completed:

And Voila!, we have successfully upgraded from CentOS 7 to the latest CentOS 8.1.x release.

The last step is to verify our CentOS’s version:

Once the upgrade is completed, make sure to open the necessary ports, as these might be disabled after the upgrade to CentOS 8.

For example, if you need to permanently open the port 8080, run

And reload the firewall:


Facebook Comments