In Debian Linux after running sudo apt-get update, all users asking for info, apt-cache show package_name, get the system-wide saved info. No need to access the Internet or local apt cache server again.

In contrast, on both Centos (v7-8) and Fedora (v32), I've noticed that even after sudo yum upgrade (or dnf), if a user types yum info package_name (or dnf) all repos are read and cached again. The same happens if another user tries, etc. Apparently the caching is user based, not system-wide.

Is my assumption correct? Any way to make yum/dnf behave like apt?

1 Answer 1


Is my assumption correct?

Yes. This is described in the dnf manpage:

DNF uses a separate cache for each user under which it executes. The cache for the root user is called the system cache. This switch allows a regular user read-only access to the system cache, which usually is more fresh than the user’s and thus he does not have to wait for metadata sync.

Any way to make yum/dnf behave like apt?

Yes; you can make dnf update the system cache by running dnf mc as root, and then run it as non-root with the -C (or --cacheonly) switch:

Run entirely from system cache, don’t update the cache and use it even in case it is expired.

The user caches will be ignored and won’t be updated.

You must log in to answer this question.

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