There are several ways to mirror a repository or cache package downloads. What is the best solution depends on how many people are going to use it and what infrastructure is already available.
For example, many universities already have local software mirrors, and in that case the easiest solution is probably to add Ubuntu to that mirror. ;)
And if your university already has a proxy server, it might be possible to use that (maybe with some custom settings for the repositories?).
When you want to mirror the whole or some part of the official repositories (and/or other repositories), you can use something like apt-mirror
, debmirror
, debpartial-mirror
, mirrorkit
or ubumirror
. Mirroring the whole repositories might pull in a lot of packages that nobody ever uses, so if bandwidth is really an issue (even at night) it might be useful to mirror only the popular packages...
When you want to cache only the used packages, there are apt-cacher
, apt-cacher-ng
or apt-p2p
, or a proxy like Squid.
One advantage of having a local mirror (when compared to a cache) is that installation/upgrades will always be fast (for the packages that are available on the mirror), while when using a cache the first person who needs a package will have to wait until it's downloaded. You can also configure the mirror to update at night, so that downloading packages happens when (almost) nobody else is using the internet uplink.
OTOH the advantage of using a cache is that you will only download exactly what packages are needed, and never more than that.