How to add packages to a squid-deb-proxy cache?

To save bandwidth and data on my Internet plan, I have installed squid-deb-proxy on a desktop, and the client on it and a few other machines I've got. However, based on the post that put me onto this , it sounds like if I take my laptop* to a different network and update it there, the downloaded updates will NOT be automatically copied back to the squid-deb-proxy server when I get back on my network.

Assuming that this is correct (I will be testing later), is there a way I can stick these packages into the cache so I don't have to download them one more time for other machines in the network?


* As noted in the comments, I could simply make the laptop the proxy server, but in my specific case, the laptop is actually 1) a VM that is not running all the time, 2) in a laptop that is not open all the time. As such, that solution, while a good one, does not work in my case.


Solution 1:

You could use apt-move (from the package of the same name) to create a local apt repository from the files in your laptop's apt cache. Then use rsync to keep a synced copy of this repository on your LAN. Finally, point other LAN machines to your LAN copy of the local repository at the top of sources.list, so that apt prefers the local repository over remote ones.