There are multiple virtual machines running Ubuntu and they are all updated by the following command:
apt-get update apt-get upgrade
But updating each VM separately takes a lot of time to download the required packages and also uses massive amount of bandwidth (which I'm running out of). Is it possible to transfer the updated files by
apt-get directly into VMs?
I know the packages are stored in
/var/cache/apt/archives but I need the apt-get database files (list of mirrors, indexes, available packages on mirrors, ...)
Update: There are many solutions
- apt-cacher-ng as mentioned in the answers.
- Docker images built for caching apt files (they run squid actually)
- Simply using squid
Also, as mentioned in the answers, see Best way to cache apt downloads on a LAN?