In Synaptic it's possible to select a bunch of packages for installation (or reinstallation), then just click File → Generate package download script to get a set of commands to download the corresponding deb files. This is useful for transferring missing packages to an offline system for installation, and it also resolves dependencies.
Unfortunately, as far as I can tell the process has some drawbacks:
- The online system has no way of knowing which of the dependencies are installed on the offline system (unless they're both somehow in sync). In the worst case this means several roundtrips to download all the necessary files.
synaptic
is not installed by default on a new system, so I'd have to use two roundtrips if I wanted to generate the package download script on the offline system - Once for the Synaptic deb file, and again with the files downloaded by the generated script.
apt-get download
is not an alternative since it doesn't resolve dependencies.
Is there some way to
- generate a package download script with the packages available on the Ubuntu live CD, or
- transfer the packaging state on the offline machine to the online one and create a package download script with the latest upstream state?
The latter option would be preferred since it would also get the latest versions of each package.
The idea is that you generate the download script from the offline system, which knows which dependencies it'll need.
It needs to not be entirely offline, to have recent package lists, but if you don't have any connectivity at all, you can still fake this by copying
/var/lib/apt/lists/
contents from an online machine (with the samesources.list
).Would apt-offline help?
https://debian-administration.org/article/648/Offline_Package_Management_for_APT
Also, there is debian manual on using apt without network connection here: https://www.debian.org/doc/manuals/apt-offline/index.en.html