What are the advantages of using yum/dnf over rpm?
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10
Issue
- What are the advantages of using
yum/dnfoverrpm? - Is there a difference between using
rpmandyum/dnfto install an RPM package? - Should I use
yum/dnfinstead ofrpmwhen installing RPM packages?
Resolution
- It is generally recommended to use
yum/dnfto install RPM packages instead of therpmcommand. - When using
yum/dnf, the installation is tracked in the package transaction history, allowing administrators to:- Review installed, updated, or removed packages.
- Undo or roll back specific transactions if needed.
- Automatically resolve and install package dependencies when repositories are available.
- In contrast, the
rpmcommand performs low-level operations and does not handle dependency resolution or transaction logging. - For further details related to package transaction history provided by
yum/dnf, refer to the following documents:
Root Cause
- The
rpmcommand lacks the capability to manage dependencies or maintain transaction history.
SBR
Product(s)
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.