Saturday, September 24, 2022

Differences between YUM and DNF package managers

In this article, we want to discuss what is the differences between YUM and DNF package managers.

Let’s see what YUM and DNF package managers are.

What is YUM?

YUM which stands for YellowDog Updater Modified is a package manager used for managing the installation, updating, and removing the software packages in a RedHat-based Linux system.

What is DNF?

DNF which stands for Dandified yum is an updated version of yum. it is work the same as yum. DNF manages the installation, updating, and removal of the software packages with more features in a RedHat-based Linux system.

What are the differences between YUM and DNF package managers

YUM package manager faced some problems such as poor performance, excessive memory usage, and slowdown for dependency resolution, so this decision was made that it replaced with the DNF package manager on Centos8 and AlmaLinux 8 and some RedHat-based Linux systems.

DNF uses “libsolv” for dependency resolution, which is developed and maintained by SUSE to improve performance. and it is written in C, C++, and Python.

YUM uses the public API for dependency resolution. and the API is not fully documented. and It is written only in Python.

Here this question is asked why a new tool has been built instead of fixing the problems.

Why a new tool has been built?

It has been explained that fixing problems aren’t possible technically. Also, the YUM team hasn’t ready to accept the changes.

The big issue is that there are 56K lines for yum, but only 29K lines for DNF, so there is no way to fix it.

However, yum still works on RedHat Enterprise Linux 6/7 (RHEL), CentOS 6/7, and OEL 6/7.

It is also used for Centos 8 and Almalinux 8, but it’s recommended to use the DNF package manager instead of YUM.

Let’s see some more differences between DNF and YUM.

Extra differences between YUM and DNF package managers

  1. DNF supports various extensions but YUM supports only Python-based extensions.
  2. In the DNF the API is well documented so it’s easy to create new features versus in the YUM It is very difficult to create new features because the API is not properly documented.
  3. The DNF uses less memory when synchronizing the metadata of the repositories. but The YUM uses excessive memory when synchronizing the metadata of the repositories.
  4. dnf update and dnf upgrade are equals. but in the yum it’s different.
  5. The dependencies on package installation are not updated in the DNF but Yum offered an option for this behavior.
  6. Kernel packages are not protected by dnf. Unlike Yum, you can delete all kernel packages, including one that runs.
  7. When removing a package, dnf automatically removes any dependency packages not explicitly installed by the user. but YUM didn’t do this.
  8. If the enabled repository does not respond, dnf will skip it and continue the transaction with the available repositories. versus If a repository is not available, YUM will stop immediately.
  9. All performance is good in terms of memory usage and dependency resolution of repository metadata in DNF. but in the yum Overall performance is poor in terms of many factors.
  10. By default, ten minutes after the system boots, updates to configured repositories are checked by dnf hourly. This action is controlled by the system timer unit named “/usr/lib/systemd/system/dnf-makecache.timer”. Also for yum too.

These are the most common differences between YUM and DNF.

Conclusion

In this article, we try to explain the differences between YUM and DNF. and why it’s better to use DNF instead of YUM. Hope it is useful for you.

For more articles, you can visit the Orcacore website.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles