Ubuntu – Does apt have a directory where it stores all downloads

14.04aptaptitudecommand line

I was wondering if apt has a directory where it stores all downloaded deb files through it. Any insight?

Best Answer

Yes, there is such directory. That's /var/cache/apt/archives/

Note that there is a subtle difference between apt and apt-get in the fact that apt doesn't cache packages by default in 16.04. This can be amended by setting Binary::apt::APT::Keep-Downloaded-Packages to true in /etc/apt/apt.conf.d/01keep-debs file. As root user , do:

echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/01keep-debs

See also.

Related Question