Is there a difference between 'yum update' and 'dnf upgrade'?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8

Issue

  • Is there a difference between 'yum update' and 'dnf upgrade'?

Resolution

There is no practical diffrence between yum update and dnf upgrade, both commands will achieve the same result, that is update each package to the latest version that is available.

Root Cause

  • From RHEL8 upward yum command as been replaced with dnf, however for convenience and backward compatibility with RHEL7, yum still exists as a alias to dnf command.

  • Similarly the update sub-command is an alias to the upgrade sub-command.

  • Chapter 3. Distribution of content in RHEL 8

On Red Hat Enterprise Linux 8, installing software is ensured by the YUM tool, which is based on the DNF technology. We deliberately adhere to usage of the yum term for consistency with previous major versions of RHEL. However, if you type dnf instead of yum, the command works as expected because yum is an alias to dnf for compatibility.
In Red Hat Enterprise Linux 9, software installation is ensured by DNF. Red Hat continues to support the usage of the yum term for consistency with previous major versions of RHEL. If you type dnf instead of yum, the command works as expected because both are aliases for compatibility.

Although RHEL 8 and RHEL 9 are based on DNF, they are compatible with YUM used in RHEL 7.
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.