Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I just copy some .debs into the cache dir and have it work (precaching)?

cache copy DIR precaching
0
Posted

Can I just copy some .debs into the cache dir and have it work (precaching)?

0

Yes! However a bit additional work is required to make them useable and persistent in the cache. First: alongside with the debs apt−cacher stores additional information: a flag file to verify that the package is completely downloaded, and a file with HTTP headers that have been sent from the server. If you copy .debs straight into the storage directory and don’t add those things, fetching them *will* fail. Fortunately Apt−cacher now comes with an import helper script to make things easier. Just put a bunch of .debs into /var/cache/apt−cacher/import (or a directory called ’import’ inside whatever you’ve set your cache dir to be), and run /usr/share/apt−cacher/apt−cacher−import.pl (you can specify alternative source directory with the first parameter). The script will run through all the package files it finds in that dir and move them around to the correct locations plus create additional flag/header files. Run it with “−h” to get more information about how to use additional features –

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123