DNF – The Next Generation Package Management Utility for RPM Based Distributions

A recent news draw the attention of many Linux users, professionals and learners that “DNF” (stands for nothing officially) is going to replace “YUM” package management utility in distributions viz., Fedora, CentOS, RedHat, etc. that are using RPM Package Manager.

The news was quite surprising and more or less a packager manager is attached to the identity of a Linux distribution which is responsible for installing, updating and removing packages.

DNF Command in Linux
DNF: Next Generatin Yum Tool

YUM (stands for Yellowdog Updater, Modified) is a free and open-source command-line based utility released under GNU General Public License and is primarily written in Python Programming language. YUM was developed to manage and update RedHat Linux at Duke University, later it got wide recognition and become the package manager of RedHat Enterprise Linux, Fedora, CentOS and other RPM based Linux distribution. It is often called as “Your Package Manager”, unofficially frequently by Linux Professionals.

Read Also

  1. YUM (Yellowdog Updater, Modified) – 20 Commands for Package Management
  2. RPM (Red Hat Package Manager) – 20 Practical Examples of RPM Commands

The Idea to Replace Yum With DNF

Ale¨ Kozumplík, the developer of DNF project is a RedHat Employee. He says:

“For the first time in the year 2009 while working on ‘Anaconda‘ – The System Installer, he had an insight working of Linux. He wanted to work on a totally different project which let him exploring packaging tool of Fedora.”

Ale¨ Kozumplík said – he has been tired of explaining that DNF stands for nothing, it is a package manager name answer so it is, nothing else. It has to be named something that don’t conflicts with YUM and hence it was named DNF.

Short comings of Yum that led to the foundation of DNF:

  1. Dependency resolution of YUM is a nightmare and was resolved in DNF with SUSE library ‘libsolv’ and Python wrapper along with C Hawkey.
  2. YUM don’t have a documented API.
  3. Building new features are difficult.
  4. No support for extensions other than Python.
  5. Lower memory reduction and less automatic synchronization of metadata – a time taking process.

Ale¨ Kozumplík, says he has no choice other than forking YUM and develop DNF. The YUM package maintainer were not ready to implement these changes. YUM has about 59000 LOC whereas DNF has 29000 LOC (Lines of Code).

The DNF Development

DNF showed its presence in Fedora 18 for the first time. Fedora 20 was the first Linux distribution that welcome users to utilise the functionality of DNF in place of YUM.

The technical challenges DNF is facing as now are – to implement all the functions of YUM. For a normal user DNF provides package download, install, update, downgrade and delete. However, still there are little or no support for features like – skipping broken package during install, debug, verbose output, enable repo, exclude packages during install, etc.

DNF and its predecessor’s comparison:

  1. No effect of –skip-broken switch.
  2. Command Update = Upgrade
  3. The command resolvedep unavailable
  4. The option skip_if_unavailable is ON by default
  5. Dependency resolving process is not visible in Command Line.
  6. Parallel downloads in future release.
  7. Undo History
  8. Delta RPM
  9. Bash completion
  10. Auto-remove, etc.

DNF integration with fedora and later in commercial environment is questioned from time-to-time by RHEL. The latest version is DNF 0.6.0 was released on August 12, 2014.

Testing DNF Commands

Install dnf on fedora or later on RHEL/CentOS using yum command.

# yum install dnf

Usages Synopsis.

dnf [options] <command> [<argument>]

Install a Package.

# dnf install <name_of_package>

Delete a Package.

# dnf remove <name_of_package>

Update and Upgrade the System.

# dnf update
# dnf upgrade

Note: As said above update=upgrade. So. is this package going to implement something like rolling release? – A future question.

The default location of dnf configuration file: /etc/dnf/dnf.conf.

Future of Project

This project aims at bringing more transparency as well as document the project fully. The project is a very infant and the support of community is required to integrate the project. A lot of functions still needs to be ported and it will take time. DNF will be officially released with Fedora 22.

That’s all for now. I’ll be here again with another interesting article soon. Till then stay tuned and connected. Don’t forget to provide us with your valuable feedback in the comments below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Ronav Saive
A Passionate GNU/Linux Enthusiast and Software Developer with over a decade in the field of Linux and Open Source technologies.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

12 thoughts on “DNF – The Next Generation Package Management Utility for RPM Based Distributions”

  1. I have installed DNF in RHEL 7. While i try to update dnf, i got the below error.
    # dnf update
    “Failed to open: /var/cache/dnf/x86_64/7.1/x86_64/7.1/epel/repodata/78892cbf09fce6504b691ad19bf59507d65da9eacdebc0aa6ed1d053b502f829-updateinfo.xml.bz2.”

    Reply
    • @Ravichandran,

      Try to run following series of commands to fix that error.

      # dnf clean all
      # dnf repolist
      # dnf upgrade
      

      If you still see the same error, try to disable extra add-on repositories like EPEL or RepoForge, these repositories are for RHEL/CentOS Only.

      First, check your /etc/yum.repos.d/ directory, here if you find other than fedora.repo, fedora-updates.repo, and fedora-updates-testing.repo.

      Remove or disable them and then run the following command.

      # dnf dnf distro-sync
      

      Hope, it will fix your problem..

      Reply
      • i had alway find this problem but when i operated this what you told ,it doen’t work [duwenink@localhost ~]$ su
        密码:
        [root@localhost duwenink]# dnf clean all
        清理软件仓库: rpmfusion-free rpmfusion-free-updates fedora epel updates
        清理所有内容
        [root@localhost duwenink]# dnf repolist
        Extra Packages for Enterprise Linux 7 – x86_64 2.4 MB/s | 10 MB 00:04
        Failed to open: /var/cache/dnf/epel-2b6dfc5904c26562/repodata/b0b669b11555557436c35421a026af14feafd01ee60059737cddbc39853c66eb-updateinfo.xml.bz2.
        [root@localhost duwenink]# dnf upgrade
        RPM Fusion for Fedora 23 – Free 1.6 MB/s | 738 kB 00:00
        Failed to open: /var/cache/dnf/epel-2b6dfc5904c26562/repodata/b0b669b11555557436c35421a026af14feafd01ee60059737cddbc39853c66eb-updateinfo.xml.bz2.

        Reply
  2. You may wish to work on your english a bit because this is full of errors making it difficult to read, but thanks for the article.

    Reply
  3. Maybe you could write about how DNF/Libsolv/Hawkey compares to APT-GET and what the benefits are to using one over the other…

    Or possibly how the new Gnome 3 “Software” interacts with DNF.

    Reply
    • May be!

      But the theme of article was Yum replacement with DNF. As far as software interaction matters, let the project attain some level of maturity.

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.