DNF and Fedora 20

(This article is an invitation for the regular Fedora users to start using DNF as their main package manager. If you are near Fedora development, read the Development discussions list or visit this blog then the article is not going to reveal much new, sorry.)

Have you ever tried Yum to install or manage your software and got disappointed? Was it ever so slooow? Or have you tried to write a Yum extension, drowned in the API, failed? We have something different to offer now: DNF—the next generation of package management.

DNF is a package manager that was forked from Yum in early 2012 with the goal of building something that looks and feels like Yum from the command line but provides better experience for people interested in writing plugins and extensions for DNF.

The first Fedora where we shipped was F18 the last winter. Many Yum commands were missing and the early adopters got surprised a lot. That is no more the case with the version shipped in F20 (0.4.9) as DNF gets more stable and feature-full, pretty much everything known from Yum works in DNF. Give DNF a chance today, simply by having it installed (‘yum install dnf’) and from then on replacing the word ‘yum’ with the word ‘dnf’ each time you need to do some packaging, e.g.:

dnf install thunderbird


dnf upgrade -y

It is true that DNF will sometimes handle the command lines arguments or the depsolving puzzle or similar things differently. To help the users transition smoothly and know about any possible speed bumps ahead we have a document that sums these things up.

To compensate for your trouble we offer comfort and speed: DNF installs a system timer that makes sure the package metadata are up to date all the time. So a sudden invocation of DNF from shell doesn’t take two minutes just to check the remote repositories for package updates but instead starts on the job immediately. We also use a very solid depsolver (developed and used by SUSE) under the hood. The early adopters report great speedups of the depsolving phase and our measurements indicate it treats the memory more economically.

To put our money where our mouth is we use DNF daily to update and modify our systems and haven’t had the software installation broken yet. During the autumn we integrated DNF within Anaconda so it is now possible to bootstrap the system without using Yum at all. We listened to the early users and gave them the known Yum goodies like full history support and parallel download.

What’s happening in the future? We’ll start shipping core DNF plugins soon, they will provide additional features that people miss from Yum but that quite don’t belong in the core DNF. Developers should check out our growing API. The Anaconda integration needs some fixes and polishing. And then there’s the feedback you’re going to give us after trying out DNF in F20 that we have to process and implement. The master plan of course is to give people everything they want from Yum and much more in DNF, and when Fedora 22 comes pronounce Yum dead and call DNF the new Yum!

23 thoughts on “DNF and Fedora 20

  1. DNF is your baby, and I have used it since Fedora 18. But since it was not part of the stan dard installation for F19, I went back to yum.

    To me YUM or DNF is a decision that is not relevant to me. It will be, however, for maintainers, and individuals wanting to integrate it into their applications.

    Regarding speed, I don’t care about it. If YUM took 5 minutes and DNF takes 2 minutes, I only care that the software is installed or removed correctly.

    I welcome DNF if that is the next generation YUM.

  2. Is there is a bigger picture for package management?

    It seems that the “default” replacement for yum is DNF, but at the same time the default replacement for the yum based packagekit is the libsov/hawkey based gnome-software?

    Will the different tools using different backends cause surprises down the line?

  3. “To compensate for your trouble we offer comfort and speed: DNF installs a system timer that makes sure the package metadata are up to date all the time.”

    I don’t think that’s strictly true, for Rawhide at least. I switched to Rawhide on my desktop a few days ago and am trying to use dnf instead of yum for everything; both times I’ve wanted to do my daily Rawhide update so far, dnf has been convinced no updates are available, and I’ve had to do ‘dnf clean expire-cache’ to get it to work. I think the cache expiry isn’t aggressive enough for Rawhide.

  4. Naheem: dnf and PackageKit both use the same backend: hawkey. We work towards eliminating all possible surprises including the data in the Yum database.

  5. Adam: you have specific needs that are not typical of the majority of users. You can modify expiry times on the update repos to get more aggressive update checks.

  6. Cristian: please open a bug for that so we can keep track. We are still trying to find the correct order of reimplementing specific tools in yum-utils so those used most often get ported first.

  7. What to investigate when in same time, dnf update did not find, but yum yes.

    [root@x yum.repos.d]# dnf update
    Resolving dependencies
    –> Starting dependency resolution
    –> Finished dependency resolution
    Dependencies resolved.
    Nothing to do.

    [root@x yum.repos.d]# yum update
    Loaded plugins: langpacks, refresh-packagekit
    Warning: group gnome-desktop does not exist.
    Resolving Dependencies
    –> Running transaction check
    —> Package google-crosextra-caladea-fonts.noarch 0:1.002-0.1.20130214.fc20 will be updated
    —> Package kernel.x86_64 0:3.12.5-302.fc20 will be installed
    —> Package kernel-debug.x86_64 0:3.12.5-302.fc20 will be installed

  8. As an ordinary user over many years, but low on real expertise, I find some jobs are best done with the CLI and some with yum-extender. It is yumex and that partly keeps me from updating all my systems from fedora 19 to F 20. Selecting amongst all the frequent updates is important; currently kernels are shipping at a great rate and I don’t always want to make the several consequential changes in e.g. hplip and VirtualBox.

    So please give some thought to creating a GUI for dnf.

  9. dnf just showed up as an update to my f20 installation. I didn’t ask for it and didn’t know about it at all. Looks like it might be usable by the time of F22 maybe? Right now it doesn’t update packagekit {not that I use that} ; appears to not care about mirror speeds {aka fastest mirror} ; not sure what it does with delatrpms as I avoid them. It also fails to integrate with etckeeper {probably its biggest failing in my opinion}. I hope it continues to develop, but IMHO it is not yet ready for primetime. I’ve helped test the last several releases {F16 ++} and not heard mention of this quirky tool once. Poor PR if you asked me.

    1. Hi Bob. Because of I use dnf on my Fedora 20 and now I find etckeeper, I wrote etckeeper plugin for dnf. You can find it on https://github.com/plistiak/dnf-etckeeper. Because I’m not familiar with git, tests and python, I cannot send pull request to etckeeper and/or dnf authors. But I hope, that this plugin help you.

  10. Hi Bog, we’ll try to do better. Can you please say more about what your expectations about etckeeper integration are? Out of the box Yum doesn’t do anything special to integrate with it AFAIK, so I’m curious. If it does, just go ahead and open a bugzilla. Thanks!

  11. Hello – I am new to Linux and even more to Fedora, which I installed only recently. Every other day I noticed a huge amount of data being downloaded for no apparent reason. It scared the hell out of me. Later I noticed a process called dnf being involved and Google led me here.

    So I decided to try it: $ dnf info guvcview
    25Mb later I had a 1kB message which described the guvcview package.

    Why all this data and time wastage? It seems to me as if the whole database of package infos is being downloaded and then searched on my PC for a match. Would it not be more efficient and quicker to do that on the server side (repository) and only download the result?

  12. Faster startup is not always desirable. I set OnUnitInactiveSec=1h to 48h
    I run a Fedora system on a Hughes Satellite connection. I am limited to how much data
    I can download except in the wee hours EST. I can’t afford hourly updates of 30 MB of metadeta. Fedora 20 is still using an older version of dnf
    Name : dnf
    Version : 0.5.4
    Release : 2.fc20
    Install Date: Thu 25 Sep 2014 02:21:10 AM PDT
    Build Date : Mon 28 Jul 2014 10:52:15 PM PDT

  13. Today I ran dnf and received ‘nothing to do’. Then I ran yum and received (among other things) a kernel update. Why the discrepancy?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *