Ubuntu – Add packages to apt’s partial archives

aptcachepackage-management

I'm experimenting with a possible answer for How to add packages to a squid-deb-proxy cache?, wherein I am trying to add files downloaded on a different network to the squid-deb-proxy cache. It occurred to me that if I could stick a downloaded package into apt's partial downloads cache, installing it would then add it to the squid-deb-proxy cache. My question, then, is this:

I have two computers, a laptop and a desktop. How can I add a package downloaded on the laptop to apt's partial downloads cache on the desktop?

I've tried simply putting it in /var/cache/apt/archives/partial, but when I go to install it, apt-get simply overwrites the file and tries to download it anew.

Best Answer

Packages that have finished downloading are not stored in the partial folder, they are stored in the /var/cache/apt/archives/ folder. Also, apt looks for the package (with the proper version) in the same folder (and not the partial folder) before trying a download. Also, putting a completely downloaded package in the partial folder doesn't sound proper, maybe that's why apt ignores it.

Related Question