Why does /var/cache/apt/archives keep deleting files?

Take a look at /etc/apt/apt.conf.d/20archive.

In there there are a few lines used by the daily apt cron job:

APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";

Those are the defaults. You should get what you want by setting all three to 0.

You can look at the headers of /etc/cron.daily/apt for more information.


This is not a direct answer to your question, but have you considered puttting something like apt-cacher-ng on one machine? It sounds like you are doing a lot of work copying when it could be done rather automatically.

All you have to do (IIRC) is install the apt-cacher-ng package on one computer, make sure port 3142 is open to your LAN if you have a firewall, and run echo "Acquire::http { Proxy \"http://<ip_of_cacher_computer>:3142\"; };" | sudo tee /etc/apt/apt.conf.d/02proxy on each client. The clients will download through the cacher computer, and if a package has ever been downloaded by one client, it will just be grabbed out of the cache instead of being redownloaded. It's a pretty automatic solution to the problem of taking a long time to download the same packages twice.


try APTonCD to make these files more portable