dnf
's importance is described in a pretty biased way, and some parts of this page feels somewhat AI-generated..
This article or section may require a cleanup. The specific problem is: is that
![]() Invoking sudo dnf upgrade on a terminal with dnf4 | |
Release Status | Maintained |
---|---|
Last Release |
dnf5 5.2.13.1 (2025-04-25) |
Language(s) | C++ |
Developer(s) | Fedora and Red Hat, et al. |
Website | github.com/rpm-software-management/dnf5 |
DNF, short for Dandified YUM, is a software package manager for Linux distributions such as Fedora, CentOS, and RHEL (Red Hat Enterprise Linux). It was designed to be a better version of the traditional YUM (Yellowdog Updater Modified) package manager, offering better performance, dependency resolution, and a more user-friendly command-line interface.
History
DNF was introduced as a replacement for YUM in Fedora 18, aiming to address some of the issues of its original predecessor. Development on DNF began in 2011, with a focus on modernizing the package management system for Fedora and other RPM-based distributions.
Development of DNF5
The development of DNF5, the next-generation Fedora package manager, began in early 2020 as a complete rewrite of the existing DNF4 codebase to address architectural and performance limitations:[1]
We've managed to drop a lot of redundant code across the whole DNF stack in the past years, but we have reached a point when it's nearly impossible to consolidate the code any further without breaking the API/ABI. Especially with PackageKit being dead[2], we can't move with the old "libhif" API in libdnf, because making any bigger changes to PackageKit is clearly out of scope.
The announcement of DNF5 development was made in March 2020, with a roadmap targeting major API changes and early development snapshots throughout 2020, aiming for inclusion in Fedora 34 and stable replacement of DNF4 by early 2021.[3]
Key motivations for DNF5's development included the need to modernize the codebase, which had become cluttered and difficult to maintain, and to move away from dependencies on Python and older APIs. The new design emphasized a fully featured package manager written primarily in C++ for improved performance, reduced resource usage, and a smaller install size compared to DNF4.[4] DNF5 also aimed to unify the software management tools in Fedora by replacing DNF and Microdnf, and providing a new daemon alternative to PackageKit.[5]
DNF5 introduced a new core library (libdnf5), revamped plugin systems, enhanced modularity support, and a streamlined command-line interface with improved user experience. The development process was marked by an emphasis on openness, community involvement, and transparent upstream issue tracking to foster broader collaboration. By Fedora 38, DNF5 was available, and it became the default package manager in Fedora 41, fully replacing the older DNF.[5]
Features
Dependency Resolution
DNF utilizes advanced dependency resolution algorithms to ensure that all required dependencies for a package are installed correctly. It resolves dependencies 10x more efficiently than YUM, resulting in faster package installation and updates.
Transaction History
DNF maintains a transaction history, allowing users to review previous actions such as package installations, updates, and removals. This feature helps users track any changes to the system, and troubleshoot any issues that arise.
Modularity Dupport
DNF offers support for modular repositories, allowing users to enable or disable specific modules within a repository. This approach provides larger flexibility in managing software components and their dependencies.
Plugin System
DNF features a plugin architecture that enables developers to extend it's functionality with additional features and customization. Various plugins are available for tasks such as package cleaning, download acceleration, and repository management.
Parallel Downloads
DNF supports parallel package downloads, allowing multiple packages to be retrieved simultaneously from repositories. This feature speeds up the overall installation and update process, especially on systems with high-speed internet connections.
Package Groups
DNF allows packages to be organized into groups, making it easier to install related sets of software. Users can install entire groups of packages with a single command, streamlining the setup of development environments or specific software stacks.
Usage
DNF can be used from the command line interface (CLI) to perform various package management tasks, including:
- Installing Packages:
dnf install <package_name>
- Updating Packages:
dnf update
- Removing Packages:
dnf remove <package_name>
- Listing Installed Packages:
dnf list installed
- Searching for Packages:
dnf search <keyword>
- Managing Repositories:
dnf repolist
,dnf config-manager
- Viewing Transaction History:
dnf history
Compatibility
DNF is the default package manager for Fedora and is also available for CentOS/RHEL starting from version 8. While it is not directly compatible with systems using YUM, DNF can handle YUM repositories and packages seamlessly, providing a smooth transition for users upgrading from older distributions.
Community and Development
DNF is an open-source project developed and maintained by the Fedora community with contributions from Red Hat and other Linux enthusiasts. The project is hosted on GitHub, where users can report issues, contribute code, and participate in discussions about future enhancements and features.
Conclusion
DNF represents a significant evolution in package management for RPM-based Linux distributions, offering improved performance, dependency resolution, and usability compared to its original predecessor, YUM. With its robust feature set, active development community, and widespread adoption, DNF continues to be a vital component of modern Linux operating systems.
References
- ↑ Announcing the start of DNF 5 development, Daniel Mach, 2020 (Accessed: 2025-06-21)
- ↑ PackageKit is dead, long live, well, something else, hughsie, 2019 (Accessed 2025-06-21)
- ↑ Announcing the start of DNF 5 development, Daniel Mach, 2020 (Accessed: 2025-06-21)
- ↑ Make DNF5 The Default, Jaroslav Mracek, 2022 (Accessed 2025-06-21)
- ↑ 5.0 5.1 Introduction to DNF5: The Next-Generation Fedora Package Manager, Sk, 2025 (Accessed: 2025-06-21)