Fedora is an interesting OS in a manner that the guys there build the software that many other (more popular!) distros use later on. DNF isn’t such a case. It has been criticized a lot, specially from other RPM communities, and it will be hardly used outside of Fedora. But you never know ;)
DNF a the next upcoming major version of Yum. It does package management using RPM, libsolv and hawkey libraries. For metadata handling and package downloads it utilizes librepo. To process and effectively handle the comps data it uses libcomps.
According to Fedora, DNF has some advantages over Yum:
- A CLI package manager tool built on modern depsolving technology allowing for faster and less memory-intensive operation.
- Documented, solid Python API.
- C bindings for lower level libraries:
- Unlike Yum, DNF runs in both Python 2 and Python 3.
DNF is scheduled to replace Yum in Fedora 22.
Not Ready Yet ..but
DNF doesn’t mean anything (it isn’t an acronym), it is just a project name and it will replace the Yum command, both as utility and name (not yet decided). There is a discussion about DNF versus Yum in Fedora Devel Lists, and some people want to point out that DNF isn’t yet as ready as Yum, by making jokes on the name:
- Did Not Finish
- Do Not Forget
- Does Not Follow
- Data Not Found
- Did Not Find
- Does Not Function
- Do Not Freeze
- Do Not Fix
- Do Not Fax
- Do Not Forward
Adam Williamson from Fedora QA Community says:
This is possibly the most useless thread I’ve ever seen on devel@, and that’s some strong competition.
I must say, I love Fedora mailing lists ;)
The truth is that DNF isn’t ready yet, it lacks features and besides it will be used in Fedora in about a year from now. It was scheduled for Fedora 22 release from beginning, but since F22 will be 6 months delayed, DNF also gets a 6 months delay.
However, DNF does some things better than Yum. Have you ever been in a position that Yum couldn’t resolve dependencies and you had to use..
$ sudo yum update --skip-broken
..and then manually fix the problems?
Most of the times DNF will resolve such issues automatically!
$ sudo dnf update
So DNF is pretty good to have it alongside with Yum. However it doesn’t really deal with the worst issue of Yum. Performance..
Many developers also reckon DNF for every day use, but not in critical environments.
Yum, DNF and GNOME-Software
Can we remove Yum totally and only use DNF? In Fedora 20 Yum is a dependency for PackageKit and therefore for GNOME-Software. In Fedora 21 PackageKit will use hawkey (the library dnf uses) and Yum won’t be used at all.
Fedora 20 has in the repos the latest DNF package (0.4.17) which was released just 3 days ago (March 5).
To install it
$ sudo yum install dnf
Next you can use it the same way as Yum, but not all Yum options are supported yet. DNF change-logs is a very nice resource to learn what it works and what’s not.
- Dnf Changelogs: http://akozumpl.github.io/dnf/release_notes.html
- Dnf Docs: http://akozumpl.github.io/dnf/
- Dnf Blog: http://dnf.baseurl.org/
- Yum: http://yum.baseurl.org/
DNF has some differences in use over Yum, and one very important is that DNF removes some guards.
$ sudo dnf erase kernel
Unlikely with Yum, DNF will remove all the kernels including the current running one!
$ sudo dnf -y erase kernel #Dont Do That!
The above command wouldn’t be really smart ;)
Instead, you can list all your kernels
$ rpm -qa kernel
kernel-3.13.4-200.fc20.x86_64 kernel-3.13.5-202.fc20.x86_64 kernel-3.13.5-200.fc20.x86_64
If you want the current running
$ uname -r
So if you want to delete a kernel with DNF, just specify the package
$ sudo dnf erase kernel-3.13.5-202.fc20.x86_64
Should we Replace Yum with DNF in Fedora 20?
As long as you don’t run a crazy CERN experiment, you certainly can try DNF. DNF won’t mess up with your Yum transactions. Actually we can run DNF and Yum at the same time!
We can also run “dnf update” without sudo!
If you want to install DNF from sources, or whatever else here is the official Git.