Centos Upgrade 7 To 8

admin14 April 2024Last Update :

Understanding the CentOS Upgrade Process

Upgrading from CentOS 7 to CentOS 8 is a significant step that involves not just a simple update but a migration to a new version with substantial differences. CentOS 8 comes with modernized features, enhanced security, and updated software packages, which necessitates careful planning and execution of the upgrade process.

Key Differences Between CentOS 7 and 8

Before diving into the upgrade process, it’s crucial to understand the key differences between CentOS 7 and 8:

  • Package Manager: CentOS 8 uses DNF as its default package manager, replacing YUM used in CentOS 7.
  • Software Repositories: The repository structure has been reorganized in CentOS 8, with modular repositories allowing for more flexible installation of software versions.
  • System Configuration Tools: CentOS 8 introduces new tools and deprecates some old ones for system configuration and management.
  • Python Version: Python 3 is the default version in CentOS 8, whereas CentOS 7 primarily used Python 2.
  • Networking: Network scripts are deprecated in CentOS 8 in favor of NetworkManager’s key files or nmcli tool.

Prerequisites for Upgrading to CentOS 8

Before starting the upgrade process, ensure you meet the following prerequisites:

  • A full backup of your system, including all important data and configuration files.
  • Ensure that there is enough free space on your system for the upgrade process.
  • An updated CentOS 7 system. Run
    yum update -y

    to update all packages to their latest versions.

  • Access to a stable internet connection for downloading CentOS 8 packages.
  • Root or sudo privileges on the system.

Step-by-Step Guide to Upgrading from CentOS 7 to 8

Step 1: Preparing the System for Upgrade

Begin by preparing your CentOS 7 system for the upgrade:

  • Remove any unnecessary or obsolete packages with
    yum autoremove


  • Clean up the yum cache using
    yum clean all


  • Install the EPEL repository if not already present, as it may provide necessary packages during the upgrade process.

Step 2: Installing the DNF Package Manager

Since DNF replaces YUM in CentOS 8, install DNF on CentOS 7 before proceeding:

yum install dnf -y

Step 3: Removing Conflicting Packages

Identify and remove any packages that might conflict with CentOS 8 versions:

  • Use the dnf command to list potential conflicts and decide which packages need to be removed or replaced.
  • Backup configuration files for services that might be affected.

Step 4: Importing CentOS 8 Repositories

You will need to import the CentOS 8 repositories to your system:

  • Download the CentOS 8 repository file and import it into your system’s repository list.
  • Disable CentOS 7 repositories to prevent conflicts during the upgrade process.

Step 5: Initiating the Upgrade Process

With preparations complete, begin the upgrade process:

  • Start the upgrade with the dnf command, specifying the release version you wish to upgrade to.
  • Monitor the upgrade process carefully for any prompts or error messages.

Step 6: Resolving Dependencies and Conflicts

During the upgrade, you may encounter dependency issues or package conflicts:

  • Address these issues by manually installing missing dependencies or removing conflicting packages.
  • Consult online forums or official documentation for solutions to common problems encountered during this step.

Step 7: Finalizing the Upgrade

Once all packages have been upgraded, perform the following final steps:

  • Reboot your system to load the new CentOS 8 kernel.
  • Verify the upgrade by checking the CentOS version with
    cat /etc/centos-release


  • Reinstall any third-party or custom software that was removed during the upgrade process.
  • Restore any backed-up configuration files and adjust them as needed for CentOS 8.

Step 8: Post-Upgrade Considerations

After upgrading, consider the following post-upgrade tasks:

  • Review and optimize new system settings and configurations specific to CentOS 8.
  • Check for any services that failed to start and troubleshoot accordingly.
  • Update firewall rules and SELinux policies if necessary.
  • Test critical applications and services to ensure they are functioning correctly.

Troubleshooting Common Upgrade Issues

Handling Package Conflicts

Package conflicts are a common issue during upgrades. To handle them:

  • Use the dnf command options to identify and resolve conflicts.
  • Manually remove problematic packages if automatic resolution fails.

Dealing with Broken Dependencies

Broken dependencies can halt the upgrade process. Address them by:

  • Finding alternative sources for the required dependencies.
  • Skipping broken packages temporarily and addressing them after the main upgrade.

Resolving Boot Issues

Boot issues post-upgrade can be due to incorrect bootloader configuration. Fix them by:

  • Using rescue mode or a live CD to access the system.
  • Reinstalling the bootloader with the correct settings for CentOS 8.

Frequently Asked Questions

Can I directly upgrade from CentOS 7 to 8 using an in-place upgrade?

No, CentOS does not support direct in-place upgrades between major releases. The process involves migrating to a new version rather than simply updating existing packages.

Is it possible to roll back to CentOS 7 after upgrading to CentOS 8?

Rolling back to an earlier major version is not recommended and can be highly complex. It’s essential to have a full backup before attempting an upgrade so that you can restore your system if necessary.

How long will CentOS 7 be supported?

CentOS 7 will receive maintenance updates until June 30, 2024. After this date, no further updates will be provided.

What should I do if my system is not booting after the upgrade?

If your system is not booting, use a live CD or rescue mode to troubleshoot. Check the bootloader configuration and system logs for errors.

Are there alternatives to manual upgrading?

Yes, there are automated tools like Leapp that can assist with the upgrade process. However, these tools still require monitoring and intervention for resolving conflicts and issues.


For additional information and best practices on upgrading CentOS systems, refer to the following resources:

Leave a Comment

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

Comments Rules :

Breaking News