I have 2 systems running Debian at home and I am trying to minimize the bandwidth use while upgrading the packages. How can I increase the size limit of the cache, so that I could just copy the packages over LAN? (currently they get removed too quickly)
Debian – Increasing Size Limit for /var/cache/apt/archives
aptcachedebian
Best Answer
The size limit is controlled by the apt option
APT::Periodic::MaxSize
. You can display your current value using the following command:To set the size, edit or create the file
/etc/apt/apt.conf.d/99local-archive
and any of the following lines:See
/etc/cron.daily/apt
for comments on available options, and the transition fromAPT::Archives::*
. (Ubuntu 14.04 ships/etc/apt/apt.conf.d/20archive
which setsAPT::Archives::MaxSize
. When they transition toAPT::Periodic
in that file, it will matter that you put your local changes in a file with a higher number.)This sets the maximum size of the cache in MiB. If the cache is bigger, cached package files are deleted until the size requirement is met (the biggest packages will be deleted first).
Make sure to do this on all machines that mount the directory.