Similar to this question I'm wondering if the following is true:

If you have both dnf and yum available to you, always prefer to use dnf over yum, because dnf was intended to replace yum.

(Difference between this question and the linked one, is I'm wondering if one is preferred, not just what the differences are. I'm also asking independent of which linux flavor you are using)

  • Counterquestion: what about your question is not answered by the answer to the question you've linked to? Jul 2, 2021 at 17:24
  • I guess I'm looking for someone to spell it out. Given the answer over there, seems like in the case of Fedora you should use it. But if you look at the article that was linked (from 2014) section "The Current State of DNF Integration" some issues are enumerated with dnf. Since that was 7 years ago, maybe things have changed. Additionally that's all in the context of Fedora and I was hoping to get a more general answer that applies to all linux flavors wher both yum and dnf are available. Jul 2, 2021 at 17:28
  • 1
    So, you can be the one to spell it out: Refer specifically to the doubts that arose from your lecture of "The Current State..."; don't let your readers stumble in the dark regarding what you're wondering about. Jul 2, 2021 at 17:29

1 Answer 1


The answer is a little bit complicated, it's mostly a "branding issue". DNF replaced YUM but to make things backward compatible and less confusing the yum command is still around and DNF is sometimes referred to as YUM v4. What you should be using and what you are using when you use yum binary depends on which distribution and what version are you running.

In Fedora, you probably don't even have YUM. There is a yum binary but it just runs dnf.

$ yum --version
  Installed: dnf-0:4.8.0-1.fc34.noarch at Fri Jun 18 15:52:04 2021
  Built    : Fedora Project at Tue Jun 15 09:17:44 2021

DNF officially replaced YUM in Fedora 22 (released in 2015). YUM was completely removed in Fedora 31 (released in 2019) which reached end of life in November 2020 so all currently supported versions of Fedora have only DNF.

In RHEL/CentOS 8 the official documentation tells you to use yum, but it's just dnf rebranded for backwards compatibility (YUM v4). YUM v3 is not available on 8.

In RHEL/CentOS 7 DNF (YUM v4) is available as a technological preview so you can try it, but you probably want to keep using the default YUM v3.

  • 2
    ...all of which means you can just keep using yum and it will do the right thing in all of the above situations.
    – larsks
    Jul 2, 2021 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .