Update CentOS 7 to 8

In this article we will tell you how to upgrade from CentOS 7 to CentOS 8, the release of which was held on 24 September 2019, after 180 days after the release of RHEL 8 – distribution on the code base which is based CentOS.

Described in the article update method at the moment is not official and is not recommended for use on production servers. We recommend you to use it to upgrade your home computer. This update method works only with version install CentOS 7 Minimal. All the steps in article, you need to make the root user with sudo privileges.

Update CentOS 7 to CentOS 8

Step 1. Preparing to upgrade

In order to perform an upgrade from CentOS 7 to CentOS 8 you must first install the required packages. First install the EPEL repository.

yum install epel-release

After performing a successful installation of the EPEL repository, we need to install rpmconf yum-utils and which will be needed in the future. Install them by running the following commands:

yum install rpmconf

yum install yum-utils

Step 2. Cleanup configuration files

Now after successful installation of the required tools we need to check and compare configs in the system utility rpmconf. If you have more than one of the same configuration, the output of the utility will prompt you to choose which one to leave:

rpmconf -a

Step 3. The search for extra packages

After comparing configs we need to check what packages we have installed from the repositories. You can authenticate the user by the utility package-cleanup. Test our system by running the following commands:

package-cleanup --orphans

package-cleanup --leaves

The next step is to check what packages can be removed. Do this with the following command:

yum autoremove

For further updates, we need to establish a system of the dnf package Manager used by default in CentOS 8 to replace yum. During installation, you must carefully observe the output of the command, because it deletes system files.

Step 4. Installing dnf

Install the dnf package Manager with the following command:

yum install dnf

Step 5. Remove yum

The next step produce the removal of yum command:

dnf remove yum yum-metadata-parser

Now delete the folder yum

rm-Rf /etc/yum

Step 6. Update CentOS

Now run the distribution upgrade using dnf with the following command:

dnf upgrade

Now we can proceed to update the version of the distribution. First install CentOS release 8:

dnf upgrade https://mirror.yandex.ru/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm

After you install the update version of the distribution we need to install EPEL repository. Install it with the following command:

dnf upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Now you need to remove the packages and old kernels remaining in the system which can cause conflicts when you will upgrade to CentOS 7 to CentOS 8. This is done with the following commands:

rpm-e --nodeps sysvinit-tools

rpm-e `rpm -q kernel`

After all above steps, we can upgrade to CentOS 7 to 8. The update is performed with the following command:

dnf --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

And the last step is to install the minimal set of packages using group control. Running this setup with the following command:

dnf groupupdate "Core" "Minimal Install"

Step 7. Checking the version

After the installation you can check for updates to the system with the following command:


You can now restart the system and check the correctness of the load of the new system. Now that you know how to upgrade to centos 7 to 8.

You will then be able to install the necessary software packages, and add third party repositories. Thank you for your attention.

Source: losst.ru

(Visited 70 times, 2 visits today)