Menu Close

Chapter 6. Updating RHEL 9 content

With DNF you can check if your system has any pending updates. You can list packages that need updating and choose to update a single package, multiple packages, or all packages at once. If any of the packages you choose to update have dependencies, they are updated as well.

The following sections describe how to use DNF to update content in Red Hat Enterprise Linux 9:

6.1. Checking for updates

The following procedure describes how to check the available updates for packages installed on your system using dnf.

Procedure

  • Run the following command to see which packages installed on your system have available updates:

    # dnf check-update

    The output returns the list of packages and their dependencies that have an update available.

6.2. Updating packages

The following procedure describes how to update a single package, a package group, or all packages and their dependencies using dnf.

Procedure

  • To update all packages and their dependencies, use:

    # dnf upgrade
  • To update a single package, use:

    # dnf upgrade package-name

    Replace package-name with the name of the package.

  • To update a package group, use:

    # dnf group upgrade group-name

    Replace group-name with the name of the package group.

Important

When applying updates to the kernel, dnf always installs a new kernel regardless of whether you are using the dnf upgrade or dnf install command.