Chapter 4. Upgrading your system from RHEL 6 to RHEL 7


After you have corrected all problems reported by the Preupgrade Assistant, use the Red Hat Upgrade Tool to upgrade your system from RHEL 6.10 to RHEL 7.9. Always perform any necessary post-install tasks to ensure your system is up-to-date and to prevent upgrade-related problems.

Important

Test the upgrade process on a safe, non-production system before you perform it on any production system.

Prerequisites

Procedure

  1. Prepare source repositories or media with RHEL 7 packages in one of the following locations:

    • An installation repository created from a DVD ISO where you download RHEL 7 packages, for example, an FTP server or an HTTPS site that contains the RHEL 7.9 packages. For more information, see Preparing installation sources.
    • Mounted installation media
    • An ISO image

      In any of the above options, you can configure custom repositories and additional repositories provided by Red Hat. For example, certain packages available in the RHEL 6 Base system are provided in the RHEL 7 Extras repository and are not on a RHEL 7 DVD.

      If you know that your system requires packages that are not in the RHEL 7 Base repository, you can install a separate RHEL 7 system to act as a yum repository that provides the required packages over FTP or HTTP.

      To set up an additional repository that you can use during the upgrade, follow instructions in How to create a local repository for updates. Then use the --addrepo=REPOID=URL option with the redhat-upgrade-tool command.

      Important

      It is strongly recommended to use RHEL 7.9 GA source repositories to prevent booting issues after the upgrade. For more information, see Known Issues.

  2. Disable active repositories to prevent problems with combining packages from different major releases of RHEL.

    1. Install the yum-utils package:

      # yum install yum-utils
      Copy to Clipboard
    2. Disable active repositories:

      # yum-config-manager --disable \*
      Copy to Clipboard

      For more information, see Can I install packages from different versions of RHEL.

  3. Run the Red Hat Upgrade Tool to download RHEL 7 packages and prepare the package installation. Specify the location of the Red Hat Enterprise Linux 7 packages:

    • Installation repository

      # redhat-upgrade-tool --network 7.9 --instrepo ftp-or-http-url --cleanup-post
      Copy to Clipboard
    • Mounted installation media

      # redhat-upgrade-tool --device device_path --cleanup-post
      Copy to Clipboard

      If you do not specify the device path, the Red Hat Upgrade Tool scans all mounted removable devices.

    • ISO image

      # redhat-upgrade-tool --iso iso_path --cleanup-post
      Copy to Clipboard
      Important

      You can use the following options with the redhat-upgrade-tool command for all three locations:

      • --cleanup post: Automatically removes Red Hat-signed packages that do not have a RHEL 7 replacement. Recommended. If you do not use the --cleanup-post option, you must remove all remaining RHEL 6 packages after the in-place upgrade to ensure that your system is fully supported.
      • --snapshot-root-lv and --snapshot-lv: Creates snapshots of system volumes. Snapshots are required to perform a rollback of the RHEL system in case of upgrade failure. For more information, see Rollbacks and cleanup after upgrading RHEL 6 to RHEL 7.
  4. Reboot the system when prompted.

    # reboot
    Copy to Clipboard

    Depending on the number of packages being upgraded, this process can take up to several hours to complete.

  5. Manually perform any post-upgrade tasks described in the pre-upgrade assessment result.
  6. If your system architecture is 64-bit Intel, upgrade from GRUB Legacy to GRUB 2. See the System Administrators Guide for more information.
  7. If Samba is installed on the upgraded host, manually run the testparm utility to verify the /etc/samba/smb.conf file. If the utility reports any configuration errors, you must fix them before you can start Samba.
  8. Optional: If you did not use the --cleanup-post option when running the Red Hat Upgrade Tool, clean up orphaned RHEL 6 packages:

    # rpm -qa | grep .el6 &> /tmp/el6.txt
    # rpm -e $(cat /tmp/el6.txt) --nodeps
    Copy to Clipboard
    Warning

    Be careful not to accidentally remove custom packages that are compatible with RHEL 7.

    Warning

    Using the rpm command to remove orphaned packages might cause broken dependencies in some RHEL 7 packages. Refer to Fixing dependency errors for information about how to fix those dependency errors.

  9. Update your new RHEL 7 packages to their latest version.

    # yum update
    # reboot
    Copy to Clipboard

Verification

  1. Verify that the system was upgraded to the latest version of RHEL 7.

    # cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.9 (Maipo)
    Copy to Clipboard
  2. Verify that the system is automatically resubscribed for RHEL 7.

    # yum repolist
    Loaded plugins: product-id, subscription-manager
    repo id                             repo name                                  status
    rhel-7-server-rpms/7Server/x86_64   Red Hat Enterprise Linux 7 Server (RPMs)   23,676
    Copy to Clipboard

    If the repository list does not contain RHEL repositories, run the following commands to unsubscribe the system, resubscribe the system as a RHEL 7 system, and add required repositories:

    # subscription-manager remove --all
    # subscription-manager unregister
    # subscription-manager register
    # subscription-manager attach --pool=poolID
    # subscription-manager repos --enable=repoID
    Copy to Clipboard

If any problems occur during or after the in-place upgrade, see Troubleshooting for assistance.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat