What have they done to YUM, moving to DNF? – Software Management with DNF

Share this post on:

What have they done to YUM, moving to DNF?

YUM was good – it worked and it allowed admins to easily install and patch software. You could even use it to roll back a bad installation. So, what happened to it? Why was DNF released? What is DNF and how hard will it be to learn a new tool?

First, DNF stands for Dandified YUM and is a rewrite of the YUM software. It was released in 2013 in Fedora 18 and was built to address many issues that YUM was starting to face.

The two most common problems with YUM were performance and RAM usage:

  • Poor performance: YUM had performance issues. A lot of this was caused by dependency resolution, the process in which all the packages and their dependencies are put together. This process could take as long as 10 minutes. DNF moved to libsolv, which significantly decreased the time to resolve complex dependencies. This is now more common that ever, with some applications requiring 30+ RPMs.
  • High RAM usage: YUM uses a lot of RAM; this really started to become an issue with RHEL/CentOS 7, with smaller servers often running out of RAM while updating.

Getting ready

DNF changes are not just in performance; there are also some key differences in its behavior. In order to test these changes, you will need an Oracle Linux 8 system and access to at least the free public repos, such as https://yum.oracle.com. You may also want to be running Oracle Linux in a virtualized environment where you can leverage snapshots to keep copies of the OS before and after a change. Oracle VM VirtualBox is a great way to do this.

How to do it…

For the most part, DNF and YUM work the same: dnf install and yum install appear to work the same way, but with DNF being faster. The same applies to dnf upgrade and yum upgrade, so you probably already know the basics.

In YUM, update and upgrade have slightly different behaviors, with yum update removing the older packages from the system. With DNF, both update and upgrade will update the installed software but the upgrade option will also remove the obsolete packages. Additionally, the auto-remove option will remove packages that are no longer required on the system.

Note

Starting with Oracle Linux 8, the yum command is a symbolic link (symlink) to the dnf command.

At this point in the development of DNF, most of the commands are the same, but DNF does have a few tricks up its sleeve, such as automatically running an update.

Share this post on:

Leave a Reply

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