We develop an appliance at work that gets delivered to low to inexistant internet locations. When updating our software, we have the full stack of technologies to ensure server is up to date such as puppet and even apt-offline.

We didn't have apt-offline installed at first and found out about it later, luckily, it was a small download to install it which was ok for most of our appliances. All of them so far have low internet (56k to 256k internet) so the 1.8mb download took some time but we got it to work.

Now that we either have the original signature of the machine because we were able to generate one at a distance or using a default signature that we created from the same USB installation key, we are able to generate a package of updates for those machines and send it over with the USB update disk for our appliance.

The problem i have is that Puppet also has packages to install. We made a list of packages that it needs to install but realized too late that apt-offline generates the signature on the offline machine with that list using --install-packages.

We tried

  • Using a ubuntu:xenial docker image, but it seems this image might have differences and doesn't package everything...
  • Using apt-offline + dselect and dpkg to set the list of packages to install

And we haven't had much luck...

The only solution left, but it is a very annoying one is to install a base appliance pre-update. Install apt-offline and generate a new default signature that everyone will use with those --install-packages but then again, the problem is when i install apt-offline, i get up to date packages for python for example. These packages won't be packaged by apt-offline when i do a "apt-offline get" because the signature indicates their are up to date.

So we are looking for:

  • A way to use a signature, default or from a real appliance
  • A way to specify more packages to install provided we don't have access to the appliance
  • A way to package all required packages even if they are up to date
  • Or something that falls into these lines



So we had to go a completely different way after all and ended up doing the following:

Create a version list of all installed packages using:

dpkg-query -W -f '${status} ${package} ${version}\n' | sed -n 's/^install ok installed //p' | sed 's/ /=/' | sort | tr -d '\15\32'

Get the selections using:

debconf-get-selections | sed '/^#,*/d'

Download all debs using:

cat "$package_list" | xargs apt-get download

Then, through the use of:


We were able to create our own local repository of packages, insert that repository as the first element in the sources list and just run an apt install with all the fixed versions. Et Voila!

| improve this answer | |
  • Important thing about selections, there might be machine specific selections that you don't want to take in such as network or grub specific settings. Be sure to scan your selections and sed out all lines that you don't want to bring along in your offline update package – Mathieu Dumoulin Oct 11 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.