4.6 C

How to use the DNF command

A package is a file that contains the binaries and other resources, which make the software and scripts pre and post-installation. It also provides information on the dependencies and other packages, necessary for the installation and execution of the software. On the other hand, in the Linux world, there are two main types of package formats. .deb for those in the Debian and Ubuntu world and .rpm for Fedora, RHEL, and CentOS. Similarly, these formats also have their own tools for package management. The .debs use apt or aptitude and dpkg, while the .rpms have been using YUM, at least until recently. Now, Fedora has replaced YUM with its new package manager, DNF.

What is DNF?

RPM packages are not installed immediately unless the prerequisites are installed first. Also, for YUM to perform dependency analysis and installed prerequisites before installing the package. Similarly, Fedora developers chose to implement DNF, as a successor or version of the next generation of YUM. Likewise, DNF is a software package manager that installs, updates, and removes packages on RPM-based Linux distributions. The new package manager automatically calculates dependencies and determines the actions required to install packages. It also facilitates the maintenance of groups of machines, eliminating the need to manually update each machine using rpm.

Frequently used DNF command.

Users should note that they must be superusers to use the DNF command to install, update, or remove the package.

To search for a package installed or available in all repositories, run the following command.

$ sudo dnf search package_name

In the case of displaying a list of all installed and available packages

$ sudo dnf list all

To view information about a package.

$ sudo dnf info package_name

In the case of installing a package and all its dependencies not installed

$ sudo dnf install package_name

If the user knows the name of the binary file to install, even though he does not know the name of the package. Even that is enough to install the corresponding package.

$ sudo dnf install /usr/sbin/named

On the other hand, to remove a package.

sudo dnf remove package_name

Similarly, to remove a group of packages.

sudo dnf remove package_name

Then, to remove the “Security Tools” package group

$ sudo dnf group remove "security tools"

On the other hand, to update all the packages and their dependencies.

$ sudo dnf upgrade

To update a single package.

$ sudo dnf upgrade package_name

For example, to update the Python package:

$ sudo dnf upgrade python

To see the available commands, see the Fedora wiki


DNF or Dandified yum, is the package administrator that allows, download, install and remove, packages from repositories. Also in Fedora, it is the default package manager since Fedora 22.

On the other hand, DNF is a secure package gesture, allowing the verification of GPG signatures on GPG signed packages. Similarly, DNF or Dandified yum will not install any package that is not signed with the correct key for that repository.

On the other hand, DNF compared to YUM, DNF has a better memory utilization. Improved dependency management and also the ability to run with Python 2 and Python 3.

- Advertisement -


Please enter your comment!
Please enter your name here

Donate to Osradar

Latest article