Is there a difference between 'yum update' and 'dnf upgrade'?
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
yumcommand as been replaced withdnf, however for convenience and backward compatibility with RHEL7,yumstill exists as a alias todnfcommand. -
Similarly the
updatesub-command is an alias to theupgradesub-command.
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
Product(s)
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.