How to Upgrade Centos 7 to 8

How to Upgrade Centos 7 to 8

How to Upgrade Centos 7 to 8

CentOS 8 has been released on Sep 23rd, 2019 ISO’s are available on the official website and could be installed in many ways, unfortunately, the minimal version is not available yet (or at all) as a SysAdmin it was my favorite build about 800 Mb compared to 6 Go, in this tutorial I will show you how to upgrade from Centos 7 to Centos 8if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-box-3-0’)};

Please consider that this is not an official upgrade so it’s not suitable for a production environment.if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-medrectangle-3-0’)};

CentOS 7 to 8 Upgrade

Download and install EPEL repository:

yum -y install

Install yum-utils:

yum -y install rpmconf yum-utils

Resolving rpm packages:

rpmconf -a


Result of rpmconf command

Keep Default.

Cleanup packages we don’t need.

package-cleanup --leaves
package-cleanup --orphans

result:if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-medrectangle-4-0’)};

Package cleanup

Install an RPM-based software DNF package manager :

yum -y install dnf


Removing yum package manager:

dnf -y remove yum yum-metadata-parser
rm -Rf /etc/yum

Updating a system with DNF:

sudo dnf -y upgrade

Installing the new version:

dnf -y upgrade

Upgrading EPEL repository:

dnf -y upgrade

Cleaning full temporary files kept on the repository

dnf clean all

removing kernels

rpm -e `rpm -q kernel`

Removing conflicting

rpm -e --nodeps sysvinit-tools

Now we launch the upgrade

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

Processing new configuration:

rpmconf -a

Confirm that new kernel-core is properly installed:

rpm -e kernel-core
dnf -y install kernel-core

Confirm that grub is updated and in the right place

ROOTDEV=`ls /dev/*da|head -1`;
echo "Detected root as $ROOTDEV..."
grub2-install $ROOTDEV

Install Minimal package:

dnf -y groupupdate "Core" "Minimal Install"

Check Centos version:

cat /etc/centos-release

CentOS Upgraded successfully

CentOS Boot screen

About the Author

Leave a Reply