Differences between YUM and DNF package managers

In this article, we want to discuss what are the differences between YUM (YellowDog Updater Modified) and DNF (Dandified Yum) package managers (Yum vs DNF).

At this point, we want to show you the exact meaning of these package managers.

What is YUM?

YUM stands for YellowDog Updater Modified. It is a package manager that you can use for the following management processes in a RedHat-based Linux system:

  • Install Software Packages
  • Update Software Packages
  • Remove Software Packages

What is DNF?

DNF stands for Dandified Yum. It is an updated version of Yum and works the same as Yum. It is used for the management processes.

Now follow the steps below to see the differences between Yum and DNF and their most useful commands them.

What are the differences between YUM and DNF package managers?

After a time, the YUM package manager faced some problems such as:

  • Poor performance
  • Extra memory usage
  • Slow down in dependency resolution

So this decision was made that Yum replaced with the DNF package manager on Centos 8 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. 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 DNF has been built?

It has been explained that fixing problems isn’t possible technically. Also, the YUM team isn’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.

YUM vs DNF

no.DNF (Dandified yum)Yum (YellowDog Updater Modified)
1DNF supports various extensionsYUM supports only Python-based extensions
2In the DNF the API is well-documented so it’s easy to create new featuresIn the YUM It is very difficult to create new features because the API is not properly documented
3DNF uses less memory when synchronizing the metadata of the repositoriesYUM uses excessive memory when synchronizing the metadata of the repositories
4dnf update and dnf upgrade are equalbut in the yum it’s different
5The dependencies on package installation are not updated in the DNFYum offered an option for this behavior
6Kernel packages are not protected by dnfwith Yum, you can delete all kernel packages, including one that runs
7When removing a package, dnf automatically removes any dependency packages not explicitly installed by the userYUM didn’t do this
8If the enabled repository does not respond, dnf will skip it and continue the transaction with the available repositoriesIf a repository is not available, YUM will stop immediately
9All performance is good in terms of memory usage and dependency resolution of repository metadata in DNFIn the yum Overall performance is poor in terms of many factors
10By 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.
Comparison of YUM vs DNF

Examples of DNF and Yum Package Manager Commands

At this point, let’s start with one of the first tasks many of us perform after installing a new Linux distro—downloading system updates.

Download System Updates

To install system updates using DNF, run the following command:

sudo dnf update -y
Or
sudo dnf upgrade -y

To install system updates using YUM, run the following command:

sudo yum update -y

sudo gives you administrative access to your system. Without it, your command will fail with an error message due to a lack of permission.

The update command downloads metadata about the packages from your available software sources so that your computer knows what versions to request.

Search for a Package

At this point, if you want to search for a program with the name “package,” simply type:

sudo dnf search package
sudo yum search package

Install Software

Like with performing a search, the command to install a program using YUM or DNF is the same.

sudo dnf install package
or
sudo yum install package

One advantage of DNF and Yum is the ability to install RPMs that you’ve downloaded manually from the web. You can do so using the same install command but include the full path to the RPM instead of a package name.

sudo dnf install /path/to/package.rpm
or
sudo yum install /path/to/package.rpm

Uninstall Software

To uninstall a program using DNF, run:

sudo dnf remove package

To automatically remove unneeded dependencies, use:

sudo dnf autoremove

Also, you can use it for YUM.

The most common useful Commands of DNF and Yum

no.Yum and DNF commandsExplanations
1dnf install package-name
or
yum install package-name
Install a Software package
2dnf upgrade package-name
or
yum upgrade package-name
Upgrade or Update a Software package
3dnf search package-name
or
yum search package-name
It looks for the desired package in the repository
4dnf remove package-name
or
yum remove package-name
Removes the desired package
5dnf info package-name
or
yum info package-name
It gives information about the desired package
6dnf list installed
or
yum list | less
It gives a list of installed packages
Useful Commands of DNF and Yum

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. Also, you will learn the most useful commands of them.

Hope this guide about the Differences between YUM and DNF package managers is useful for you.

For more articles, you can visit the Orcacore website.

Also, you may be like these articles:

Use YUM and RPM Package Managers on AlmaLinux 8

How To Convert AlmaLinux 8 To Rocky Linux 8

How To Convert Centos 8 to AlmaLinux 8

2 COMMENTS
  1. Simply desire to say your article is as amazing. The clearness on your put up is just spectacular and that i can assume you are an expert in this subject.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular