DNF Package ManagerIf you’ve used the Linux command line much at all, you’re probably familiar with yum.

Yum — an acronym for the “Yellowdog Updater, Modified” — is an RPM-based package manager that is now obsolete.

Dnf — an acronym for “Dandified Yum” — is the replacement RPM-based package manager used in place of yum.

Switching from yum to dnf is really about as simple as typing in one instead of the other, but for anyone who is not completely familiar with either command, this lesson is intended as a starting point.

A Word About RPM

First off, let’s address that little “RPM” issue. What is it? And what does it have to do with any of this?

RPM originally stood for Red Hat Package Manager; it is a package manager that was created for Red Hat Linux.

It was later adopted by other Linux distributions; the name is now a recursive acronym for RPM Package Manager.

To break it down even further, a package manager — or package management system — is a collection of tools used to install, update, configure and remove packages (applications, tools, programs, etc.) according to a consistent standard.

RPM files are identified by their .rpm file extensions to indicate that they are packaged according to the RPM standards. They can be installed/updated/configured/removed/etc. via a front-end RPM package manager such as dnf (or previously yum).

What DNF Can Do

The available DNF sub-commands are:


Using the DNF Command

Using the dnf package manager is a simple matter of putting it together with the appropriate sub-command and a package or packages.

Packages (systems, applications, etc.) can be updated (upgraded), listed, installed, removed (uninstalled), detailed, etc. using this simple method.

The following examples will get you started right away.

First and foremost, existing packages can be updated all at once (assuming there are available updates) by typing in dnf upgrade.

Installed and/or available packages can be searched by package name (or part of a package name), via dnf search application-name.

To list description and summary information about installed and/or available packages, try dnf info application-name.

To install a new (available) application, use dnf install application-name.

Use dnf install application-file-name.rpm to install specific package files that are already local (downloaded, etc.).

To uninstall a package, use dnf remove application-name.

Package Status

From time to time, it can become necessary to try and determine whether or not a package has been installed.

The dnf info application-name command may tell you this, if you pay close attention to the “Repo”, as a value of “@System”, etc. can indicate
that a package is installed on the system.

Another dnf command is — to me — superior, and that is dnf list installed application-name.

There are also other options, such as using the rpm command. The command rpm -q application-name will literally tell you “package application-name is not installed” if such is the case, and will otherwise print the complete package name.Using grep to search, and piping it into the rpm command, is another option that may turn up additional results, but will return blank if no results are found: rpm -qa | grep application-name

Informally, the whereis command can be used to see if a application location can be found: whereis application-name


Try out these commands, and you’ll be well on your way toward mastery of the dnf command.

Dnf masters — what commands do you recommend, that you cannot believe I overlooked?