Another few colleagues and I are responsible for managing a CentOS 7 server. However a few of us prefer dnf as the package manager, while the rest prefer yum, mostly due to being more familiar with it. Since both are based on rpm, I'm really not sure if it's okay to use them together. Neither is there any documentation explicitly advising against using them together (that I can find).

Okay, I know this situation of mixing two package managers isn't great, obviously. Ideally I should be encouraging my colleagues to transition to dnf, but that takes time, and people are going to be people.

All I want to know, is whether there's any glaring issues that could potentially be catastrophic. Sources would be welcomed. Thanks.

  • 2
    Some differences from a Red Hat slideset. History is not shared between YUMv3 (yum) and YUMv4 (dnf). Databases are in different locations. A transaction performed using dnf cannot be rolled back using yum and vice versa. See people.redhat.com/mskinner/rhug/q3.2018/…
    – fpmurphy
    Apr 29, 2020 at 1:12
  • @fpmurphy That link was very useful. I would accept it if you put it down as an answer, thanks.
    – cyqsimon
    Apr 29, 2020 at 1:49

1 Answer 1


I don't see any real problem arising from that. Both build on the rpm database and ecosystem, so they can't really break something.

Each one keeps its own cache, so that might use a little more disk space, but that shouldn't be a problem. They might solve some dependencies a little differently, but even if differences arise, I expect those differences to be real edge cases. And even though they might install a different dependency version, that still shouldn't cause trouble for the other package manager.

The only real differences are in the CLI. Here are two differences in behavior which marked me most (note again, this behavior won't break anything for the other package manager):

  • Thanks, although this source is probably more useful in helping my colleagues transition rather than showing concretely whether dnf and yum are compatible... Useful nonetheless
    – cyqsimon
    Apr 29, 2020 at 1:52
  • in short, afaik they are completely compatible.
    – Chris Maes
    Apr 29, 2020 at 6:06

You must log in to answer this question.

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