Computer scienceSystem administration and DevOpsCommand linePackage managers

Package manager yum/dnf

3 minutes read

As you may already know, in GNU/Linux systems programs are stored in form of packages in special places called software repositories. You can control programs with the package manager. There are several such managers in Linux. In this topic we will analyze two of them: YUM and DNF.

What is YUM manager

YUM stands for Yellowdog Updater, Modified. YellowDog in the name refers to Yellow Dog Linux, a free and open-source Linux-based operating system for PowerPC computers that evolved in 1999-2009. YUM is an open-source console package manager for Linux distributions based on RPM format packages.

The RPM format was originally developed for the Red Hat Linux distribution and thus RPM stands for its acronym. However, it is currently used in many Linux distributions such as Fedora, CentOS, OpenSUSE, OpenMandriva, and Oracle Linux. And YUM is one of their package managers.

The YUM manager can perform operations such as:

  • installing packages
  • deleting packages
  • updating installed packages
  • listing available packages
  • listing installed packages

Below we will analyze how these operations are performed in practice.

YUM manager usage

Let's say we need to install the thunderbird package using the YUM manager. The command syntax will be as follows:

yum install thunderbird

So, we have installed the package. If you need more information about a package, you can use the corresponding info command:

yum info thunderbird

If we need to remove it later, we will need the remove command:

yum remove thunderbird

In order to update existing installed packages, you will need the following command:

yum update

You can also type yum update <package name> if you need to update only one specific package.

To see all the installed packages, you may use this command:

yum list installed

And if you need to check if a package is installed, type yum list installed <package name>.

You can also find a package by name and description. For this, there is a yum search <package name> command.

So, we have analyzed the main commands of the manager. In order to get more information about it, use the yum help command.

Next, we will take a look at the dnf package manager.

What is DNF manager

DNF or Dandified YUM is the next generation of YUM, a package manager for Linux distributions based on RPM packages.

DNF has been in development since 2011 and was introduced in Fedora 18. It has been used as the primary package management system since Fedora 22. On some other distributions, it may not be preinstalled, but you can install it yourself using the manager you already have.

DNF was intended to address some of YUM's shortcomings, such as low performance, high memory consumption, etc. The DNF Package Manager superseded YUM as there were many unresolved issues in Yum.

In general, DNF solved such YUM problems as:

  • low performance
  • excessive consumption of RAM
  • slow resolution of dependencies

Some of DNF's capabilities have been carried over to YUM 4 from 2017.

The DNF utility has all the capabilities of YUM and is its complete replacement, less demanding on system resources. The commands and their syntax, respectively, are identical, you only need to replace the word yum with the word dnf when typing them. For more information, you can also use the dnf help command.

Conclusion

So, we've reviewed two package managers in Linux, YUM and its improved version DNF. The latter is technically better than the first, but they essentially have the same functionality. Where RPM packages are used, one of these managers usually comes with the distribution. Also, both managers can be installed on different systems using other package managers.

64 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo