DNF, YUM and RPM package manager comparison


We have been using the yum or rpm package management tools for a while for managing packages in Redhat, Centos and other distributions which have been forked from RHEL.
Yum has been the default package manager since Redhat Enterprise Linux 5 onwards. Before yum, RHEL systems had been using the up2date software management program.
The DNF package manager was introduced in Fedora 18 and became the default package manager for the Fedora distribution for operating system version Fedora 22 onwards and is intended to be a replacement for yum.

In this article, we will compare these package managers to provide some perspective as to when and why you should consider using one over the other.

Sno                    DNF               YUM                                     RPM
1 Written in C and Python Written in python Written in C and Perl
2 DNFs uses libsolv for dependency resolution which was created and maintained by SUSE YUM uses public API for dependency resolution RPM does not provide dependency resolution
3 Dependency resolution is fast and easy making installation of groups of packages very simple Dependency resolution is slower as compared to dnf but is still fairly straightforward Due to lack of dependency resolution installation of software applications having multiple dependency requirements is very tedious
Does not require dependent packages to be available locally Does not require dependent packages to be available locally Since rpm cannot resolve dependencies on its own, it needs all dependent packages for a package to be available locally on the system in the same folder as that of the concerned package
4 DNF supports more extension YUM support only Python for extension RPM functionality can be extended somewhat using C
5 Multiple packages can be installed with a single command Multiple packages can be installed with a single command Can be used to install multiple .rpm package files in a single command provided there are no dependency issues
6 DNF has a well-documented API making adding new features easy Building new features in yum is not as straightforward Both yum and dnf use rpm under the hood for underlying package management operations
Can connect to online or remote repositories to search for packages Can connect to online or remote repositories to search for packages Rpm tool cannot connect to online repositories
7 DNF uses lower memory reduction and less automatic synchronization of metadata with repositories YUM uses high memory reduction and automatic synchronization of metadata with repositories Not applicable since rpm does not provide the ability to connect to online repositories
8 DNF allows all installed packages to be updated with a single command: dnf update YUM allows all installed packages to be updated with a single command: yum update RPM does not provide this feature. To update a .rpm package using RPM, the updated .rpm file for the concerned package must be available locally on the system. To update the package, use rpm -Uvh <.rpm file name>
9 If a package has unmet dependencies during a dnf update action, that package will not be updated. With yum it is possible to update to a package that has unmet dependencies using the –skip-broken option A package update using rpm will fail if any package dependency has not been met
10 If enabled repository does not respond, dnf will skip it and continue the transaction with the available repos YUM will not proceed if a repository is unavailable NA
11 dnf update and dnf upgrade are equivalent yum upgrade Is the same as the yum update command with the –obsoletes flag set NA
12 Dependencies are not upgraded on package installation It is possible to upgrade dependencies during package installation while using yum RPM requires that a compatible version of the dependent package be available on the system. It will install an updated dependent package provided there are no compatibility issues
13 Clean on remove: When removing a package, dnf will automatically remove any dependent packages that were not explicitly installed by the user. Yum will not remove dependencies during package removal Rpm will not remove dependencies during package removal
14 kernel packages are not protected by dnf meaning you can remove all kernel packages, including the running package Yum will not allow this behavior Rpm will error out if you try to remove the kernel package since other packages are dependent on it
15 DNF uses separate libraries for interacting with repositories and dependency resolution Yum does not use separate libraries for such functions NA
16 Allows parallel operations Does not allow parallel operations Allows parallel operations
17 Can work with both python versions 2 and 3 Compatible with python version 2 only Does not rely on python
18 Default package manager for Fedora Default package manager for most Redhat based distributions Installed by default on almost all Redhat based distributions


In this article, we compared the different features of the three package management software. We hope that this information helps you understand and determine why one or more of the three package managers would be best suited for which scenarios.

The following two tabs change content below.

Sahil Suri

He started his career in IT in 2011 as a system administrator. He has since worked with HP-UX, Solaris and Linux operating systems along with exposure to high availability and virtualization solutions. He has a keen interest in shell, Python and Perl scripting and is learning the ropes on AWS cloud, DevOps tools, and methodologies. He enjoys sharing the knowledge he’s gained over the years with the rest of the community.

Latest posts by Sahil Suri (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *