DNF (abbreviation for Dandified YUM) is a package manager for Red Hat-based Linux distributions and derivatives. DNF was introduced in Fedora 18 in 2013 as a replacement for yum; it has been the default package manager since Fedora 22 in 2015 and Red Hat Enterprise Linux 8 in 2019 and is also an alternative package manager for Mageia. DNF performs package management tasks on top of RPM, and supporting libraries.
Usage
The DNF package manager works similarly to other package managers. Its core usage works very similarly to the Apt Package Manager, such as install, remove, and upgrade.
Usage for basic command is as follows:
sudo dnf list
sudo dnf search <pattern>
sudo dnf info <package_name>
sudo dnf install <package_name>
sudo dnf remove <package_name>
sudo dnf upgrade
sudo dnf distro-sync
History
Perceived deficiencies of yum (which DNF is intended to address) include poor performance, high memory usage, and the slowness of its iterative dependency resolution. DNF uses libsolv, an external dependency resolver (developed by openSUSE).
Developed from 2011 onwards at Red Hat by developer Aleš Kozumplík, who had problems with the Anaconda installer and the YUM package manager. DNF got approved for Fedora 18 and was released for testing in January 2013. The project was supposed to be able to replace YUM with an alternative that would have a cleaner code base and use a different dependency-resolution architecture. DNF used the library `hawkey` to communicate with a dependency-resolution library called `libsolv`, which was first written for openSUSE.
It was decided by the Fedora Engineering Steering Committee to use DNF as the new default package manager for Fedora 22 in 2014. In May 2015, a new release of Fedora (22) switched from YUM to DNF as their package-management tool. DNF continued to support many of the YUM commands without losing support for command-line usage, instead using the tools hawkey and libsolv for dependency resolution.
DNF was originally written in Python, but in 2016, efforts were under way to port it to C and move most functionality from Python code into the new libdnf library. In 2018, the DNF team announced the decision to move libdnf from C to C++. libdnf is already used by PackageKit, a Linux distribution-agnostic package system abstraction library, even though the library doesn't have most of DNF's features.
Since the launch of Fedora Linux 41, DNF5 is the new default packaging tool. This release features new performance enhancements, updated terminal output, and fully integrated modularity.
Adoption
DNF has been the default package manager for Fedora since Fedora 22, released in May 2015. The libdnf library is used as a package backend in PackageKit, which provides a package-management API used by graphical software-management tools. dnfdragora was developed as a graphical front-end for DNF and was introduced in Fedora 27.. DNF has been available as an alternative package manager for Mageia Linux since Mageia 6.
In Red Hat Enterprise Linux 8 and 9, and in distributions such as AlmaLinux and Rocky Linux based on them, yum is an alias for dnf.
References
External links
Official website
