第 7 章 Performing post-upgrade tasks on the RHEL 10 system


After the in-place upgrade, clean up your RHEL 10 system by removing unneeded packages, disable incompatible repositories, and update the rescue kernel and initial RAM disk.

7.1. Performing post-upgrade tasks

After performing the upgrade to RHEL 10, complete the following recommended major tasks.

Prerequisites

*You completed the Performing the upgrade procedure and you have been able to log in to RHEL 10.

  • You verified the status of the in-place upgrade as described in Verifying the post-upgrade state. This includes verification that the Leapp utility has finished the upgrade process.

Procedure

  1. Remove any remaining Leapp packages from the exclude list in the /etc/dnf/dnf.conf configuration file, including the snactor package, which is a tool for upgrade extension development. During the in-place upgrade, Leapp packages that were installed with the Leapp utility are automatically added to the exclude list to prevent critical files from being removed or updated. After the in-place upgrade, these Leapp packages must be removed from the exclude list before they can be removed from the system.

    • To manually remove packages from the exclude list, edit the /etc/dnf/dnf.conf configuration file and remove the desired Leapp packages from the exclude list.
    • To remove all packages from the exclude list:

      # dnf config-manager --save --setopt exclude=''
  2. Remove remaining RHEL 9 packages, including remaining Leapp packages.

    1. Locate remaining RHEL 9 packages:

      # rpm -qa | grep -e '\.el[789]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
    2. Remove remaining RHEL 9 packages from your RHEL 10 system. To ensure that RPM dependencies are maintained, use the dnf remove command.

      For example:

      # dnf remove $(rpm -qa | grep \.el[789] | grep -vE 'gpg-pubkey|libmodulemd|katello-ca-consumer')
      重要

      This step might also remove third-party packages. Review the transaction before accepting to ensure no packages are unintentionally removed.

    3. Remove remaining Leapp dependency packages:

      # dnf remove leapp-deps-el10 leapp-repository-deps-el10
  3. Optional: Remove all remaining upgrade-related data from the system:

    # rm -rf /var/log/leapp /root/tmp_leapp_py3 /var/lib/leapp
    重要

    Removing this data might limit Red Hat Support’s ability to investigate and troubleshoot post-upgrade problems.

  4. Disable DNF repositories whose packages are not RHEL 10-compatible. Repositories managed by RHSM are handled automatically. To disable these repositories:

    # dnf config-manager --set-disabled <repository_id>

    Replace repository_id with the repository ID.

  5. Replace the old rescue kernel and initial RAM disk with the current kernel and disk:

    1. Remove the existing rescue kernel and initial RAM disk:

      # rm /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* 
    2. Reinstall the rescue kernel and related initial RAM disk:

      # /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)"
    3. If your system is on the IBM Z architecture, update the zipl boot loader:

      # zipl
  6. Check existing configuration files:

    • Review, remediate, and then remove the rpmnew, rpmsave, and leappsave files. Note that rpmsave and leappsave are equivalent and can be handled similarly. For more information, see What are rpmnew & rpmsave files?
    • Remove configuration files for RHEL 9 DNF modules from the /etc/dnf/modules.d/ directory that are no longer valid. Note that these files have no effect on the system when related DNF modules do not exist.
  7. Re-evaluate and re-apply your security policies. Especially, change the SELinux mode to enforcing. For details, see Applying security policies.

Verification

  1. Verify that the previously removed rescue kernel and rescue initial RAM disk files have been created for the current kernel:

    # ls /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* 
    # lsinitrd /boot/initramfs-*rescue*.img | grep -qm1 "$(uname -r)/kernel/" && echo "OK" || echo "FAIL"
  2. Verify the rescue boot entry refers to the existing rescue files. See the grubby output:

    # grubby --info /boot/vmlinuz-*rescue*
  3. Review the grubby output and verify that no RHEL 9 boot entries are configured:

    # grubby --info ALL
  4. Verify that no files related to previous RHEL are present in the /boot/loader/entries file:

    # grep -r ".el9" "/boot/loader/entries/" || echo "Everything seems ok."
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部