Dnf Replacing Yum?

Home » CentOS » Dnf Replacing Yum?
CentOS 14 Comments

I saw mention of dnf in a blog article about installing a package on CentOS. Further investigation revealed that Fedora is replacing yum with dnf, apparently a new and better yum. But it wasn’t clear if dnf was a drop-in replacement or if some migration setup was required. Is it supposed to work with CentOS or do we ignore it until some future release?

I installed dnf with yum and tried installing another package with it and it complains:

[root@orifice ~]# dnf install certbot Failed to open:
/var/cache/dnf/x86_64/7/x86_64/7/epel/repodata/b3221500eaedf45b7ec0737a410cde7e3f09b49070c729449938b961ccbdf397-updateinfo.xml.bz2.

I don’t install new packages often, but it does sound like dnf’s new dep solver is a Good Thing when that’s needed.

14 thoughts on - Dnf Replacing Yum?

  • For users, it’s a drop-in replacement. If you write extensions, some migration is required, because the API has been cleaned up.

    Users can safely ignore it until a future release.

  • Kenneth Porter wrote:

    For the normal user (like me) dnf is neither better nor worse than yum. In fact it is almost identical.

    In my view, the introduction of a new name was completely unnecessary and the cause of the only (small) complication with the changeover, eg should I look in /etc/yum.repos.d/ or /etc/dnf.repos.d/ ?

    Also, yum had associations which it was sad to lose.

  • Perhaps the Fedora (“We love consulting all affected users”) replacement could be named MUD.

    Now we await the System-D controlling interface ;-)

  • There was much wailing and gnashing of teeth when these changes rolled into Fedora. After a while, I got used to it and now it seems normal. Plus, if you type “yum update” it responds “what your really should type is dnf update, but I’ll do it for you anyway”.

  • There was a mail on the Fedora development list recently from one of the internal Red Hat RHEL yum guys.

    It implied that in RHEL the command would remain yum and not change to dnf, although the internals will no doubt do so at some point.

  • Well, from what I’ve heard from some Red Hat RHEL Kernel guys, it will be likely in RHEL 8.x as default with a yum compat cli, but unlikely to get into RHEL 7.x as replacement for yum, and should stay confined to EPEL. The reason given was: “(DNF is) not quite Enterprise ready, yet. Lets look again during Fedora 25”.

    – Yamaban.

  • –1scJElNR7AKUhfC8ieV74h55ItD25aQ4A
    Content-Type: text/plain; charset=windows-1252
    Content-Transfer-Encoding: quoted-printable

    Based on previous RHEL history I would agree with Yamaban’s take
    (probably in RHEL 8.x, likely not in RHEL 7). But Red Hat has been a bit less conservative with making changes to RHEL 7 than they were the previous version of RHEL.

    Still, for them to make a change there would need to be some driving force for that change (IMHO). For example, if there were new technology areas (containers, cloud) where dnf had major functionality advantages over yum, then they might consider a change. Otherwise, I just don’t see it.

    But, I have been wrong before .. a lot .. so take that with a grain of salt :)

    Thanks, Johnny Hughes

    –1scJElNR7AKUhfC8ieV74h55ItD25aQ4A

  • To make it clear here is the specific link on the fedora-devel archives discussing this:

    https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ALJVP7YTSEPC4HNH6JSFMFM6MCUP5HAT/

    “Currently we’re slated to keep yum as the primary name/command for package management in RHEL. It may or may not be backed by dnf at some point; we’re still looking at the pros & cons and how to bring better compatibility if we go down this path.”

    So my expectation is that RHEL8 will use dnf internally but the interface will be called yum

  • How about their recent agreements with Microsoft? That would be enogh driving force for them to account for all changes we observed so far IMHO
    (didn’t look into dnf details so I exclude that for the moment from my comment…).

    Valeri

    ++++++++++++++++++++++++++++++++++++++++
    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247
    ++++++++++++++++++++++++++++++++++++++++

  • –ORkc6G0TMnobhUWpBJ9JRkPaRoGMF3KwU
    Content-Type: text/plain; charset=windows-1252
    Content-Transfer-Encoding: quoted-printable

    Well, striking an agreement so that RHEL can run on the Azure Cloud
    (where SLES and Ubuntu and CentOS are already at) and on hyperv .. and working with them to make Windows run better on KVM as a VM to me makes perfect sense. Other linux versions are already there (hyperv/azure)
    and their customers want a paid RHEL option .. and people also need to run Windows server for some things as a VM on RHEL KVM hosts.

    I certainly don’t want to start a flame war either way, but people with customers need to do what their customers want .. and on both sides that was for things to work together in their enterprise from both companies.

    Of course, we can start a flame war and discuss how evil Microsoft is or how evil money is or how evil global warming is or any other number of things. There will be many people on either side of all of those positions .. but I’m not sure this is the forum for those discussions.

    The bottom line for DNF, just like any other software that Red Hat releases is .. if they build it and make it the default in RHEL, it will become the default in CentOS .. we don’t political or linux religious wars (like systemd, selinux) here. We build whatever source code Red Hat releases when they release it. Nothing more and nothing less.

    –ORkc6G0TMnobhUWpBJ9JRkPaRoGMF3KwU

  • Sorry, I didn’t mean it sound the way it sounded… Should have used
    “rant” tags. I guess, it is just me in general unhappy about all Linuxes getting much less “UNIX”y lately. Nothing about Linux, mostly about me not blending into “iPad generation”, I figure.

    My apologies about the noise.

    Valeri

    ++++++++++++++++++++++++++++++++++++++++
    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247
    ++++++++++++++++++++++++++++++++++++++++

  • We are doing exactly the same thing and for the same reasons. We have been running RH or its derivatives since 1998 but now it is time for us to move on.