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
4.8.0
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.