Software & Apps Linux How to Upgrade to CentOS 8 Get the latest CentOS update by Nicholas Congleton Writer Nick Congleton has been a tech writer and blogger since 2015. His work has appeared in PCMech, Make Tech Easier, Infosec Institute, and others. our editorial process Twitter LinkedIn Nicholas Congleton Updated on January 15, 2020 Tweet Share Email Linux Switching from Windows CentOS is a favorite for stability and security. It’s known from providing a rock solid base for nearly any server application. The CentOS 8 release builds upon that foundation while adding a few more modern improvements to help make managing your business servers even easier. Why You Shouldn’t Upgrade Before you dive in, you should be aware that there is no officially supported upgrade path from the CentOS team or Red Hat. If you’re looking for the absolute most reliable way to get CentOS 8 on your servers, you should back up all of your previous data and perform a full migration to a fresh CentOS install. That said, if you want to try upgrading, it is possible. You should back up all of your data before continuing anyway to ensure that this totally unsupported upgrade method cost you anything but time, should the worst happen. How to Upgrade From CentOS 7 to CentOS 8 Once you've decided to upgrade, here's how to do that: Back up all of your data. Seriously, do it. Begin by installing the EPEL repository on your system, if you don’t already have it. yum -y install epel-release Now install a couple of necessary packages from the EPEL to help you reconfigure your repositories for CentOS 8. yum -y install rpmconf yum-utils Next, you’ll need to resolve the RPM packages on the system with rpmconf. To avoid conflicts when updating, accept the default action for each configuration, when asked. rpmconf -a Clean up any packages that you don’t need on our system. The fewer packages you have, the less chance there is for complications. package-cleanup --leavespackage-cleanup --orphans You’re ready to start the first part of the upgrade. CentOS 8 uses the new DNF package manager. It works exactly like YUM, but it’s more efficient. It’s also the first thing you’ll need to begin the upgrade. yum -y install dnf With DNF on your system, you no longer need YUM. It’s time to remove it. dnf -y remove yum yum-metadata-parserrm -Rf /etc/yum You’re now ready to upgrade your system using DNF. dnf -y upgrade Pull the new release package for CentOS 8, and install it with DNF. This will kick off the upgrade process to CentoOS 8. dnf -y upgrade http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm Do the same to upgrade the EPEL repository. dnf -y upgrade yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm Remove any temporary files that might be hanging around your system. dnf clean all Remove the old kernel from CentOS 7. rpm -e --nodeps `rpm -q kernel` Then, remove the other system packages that will cause conflicts. rpm -e --nodeps sysvinit-tools It’s time to upgrade the rest of the system. Use DNF to upgrade everything. dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync There’s a good chance that something broke. That’s fine. Take a look at the error message. Locate the offending package in the message, and uninstall it like you did the kernel with: rpm -e --nodeps <packagename> You may want to write down the package, so you can reinstall it after the upgrade. Then, re-run the previous step. Now, reinstall the kernel. dnf -y install kernel-core Finally, update the core of the operating system to ensure everything’s there and current. dnf -y groupinstall “Core” “Minimal Install” Check to see that the install succeeded. cat /etc/redhat-release Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Email Address Sign up There was an error. Please try again. You're in! Thanks for signing up. There was an error. Please try again. Thank you for signing up. Tell us why! Other Not enough details Hard to understand Submit