6

With APT (Ubuntu), downloaded packages are stored at:

/var/cache/apt/archives

Where does DNF (Fedora) store downloaded packages?

2 Answers 2

10

DNF stores downloaded packages and metadata in /var/cache/dnf, in various per-repository subdirectories.

By default, after a successful installation, the packages are removed. You can change this behavior with keepcache in /etc/dnf/dnf.conf.

Note that PackageKit — in use on Fedora Workstation by default — puts packages in /var/cache/PackageKit, so you can get duplicates. Harmonizing this is work in progress.

2
  • Quick find packages find /var/cache/dnf -name '*.rpm' Commented Feb 25, 2020 at 3:02
  • Do you know where is the cache for the user stored? E.g. if you run dnf repoquery without root. I was unable to find this in the dnf documentation. It says: 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.
    – hroncok
    Commented Mar 19, 2021 at 11:12
0

It doesn't - once a package is installed the downloaded rpm file is not normally kept.

The file will be in the cache (in /var/cache/dnf) briefly but once it has been successfully installed that will be removed.

1
  • Technically the files are stored when downloaded. The time before deletion is irrelevant here, as the question already mentions cache, assuming the knowledge of short-term vs long-term storage.
    – reukiodo
    Commented Jun 24 at 17:50

You must log in to answer this question.

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