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.
In the following sections, learn how to update content in Red Hat Enterprise Linux 9 by using DNF:
6.1. Checking for updates
To check the available updates for packages installed on your system by using the
dnf check-update command, complete the following steps.
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
To update a single package, a package group, or all packages and their dependencies by using the
dnf upgrade command, complete the following steps.
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.
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.
6.3. Updating security-related packages
To update security-related packages by using the
dnf upgrade or
dnf upgrade-minimal command, complete the following steps.
To upgrade to the latest available packages that have security errata, use:
# dnf upgrade --security
To upgrade to the last security errata packages, use:
# dnf upgrade-minimal --security