This is a complex question... For years, I have been looking for a proper solution to this problem: I am working in Africa where internet connections are often slow and limited to a few locations. When offering GNU/Linux to people here, the access to the repositories in order to update the computer or to install new software is always a problem.
This time, I have an acceptable V-Sat connection at home, but in the office, the connection is limited to the corporate computer (through VPN, etc.). Plugging a Linux box to the local network does not give access to internet.
I am willing to offer to the employees to install a GNU/Linux distrib on their old private computers (Ubuntu flavors only) and I would like to setup something that offer them the possiblity to update their computer in the office through an indirect "apt-mirror" kind solution.
Concretly, I would need to find the way to update the pkgcache.bin automatically, then they could generate a download script that I would execute at the residence and the day after, they can get the requested packages for installation/update.
To do that, I could configure a Raspberry Pi 2 box that would act as a local repository, but I do not want it to download all the available packages (9 Gb that I cannot afford), but only the ones already installed (for update) or those requested (from the script).
Suggestions/questions/thoughts are very much welcome!
NB: This is not a duplicate of How can i avoid downloading packages every-time I install my Ubuntu?. Indeed, in my case, I need a solution where the clients will connect to the local repository server in a location with no internet connection for none of them, neither the server (only local LAN). The server (i.e. a Raspbery Pi 2 machine) will then be physically moved to a site where it does have internet access and download the packages requested by the client. Once back to the local LAN, it will allow the client to update or install the requested packages...
NR 2: However, I believe it is a duplicate of this question: How can I install software or packages without Internet (offline)? and Camicri Cube may be the best solution (apt-offline may also be suitable)...
So, yes, it is a duplicate... (I do not know how to mark it as such).