Skip to content

Instantly share code, notes, and snippets.

@s4eidhp
Last active October 12, 2024 08:47
Show Gist options
  • Save s4eidhp/92c054c17956e1d5e71378311c736efd to your computer and use it in GitHub Desktop.
Save s4eidhp/92c054c17956e1d5e71378311c736efd to your computer and use it in GitHub Desktop.

How to install a package on a machine which does not have internet access?

Steps

  • download apt-offline .deb package file from https://packages.ubuntu.com and transfer it to offline machine

  • install apt-offline

sudo dpkg -i apt-offline_<version>_all.deb
  • generate a request for a package index update and consequent installation of a package on the offline machine
sudo apt-offline set --install-packages PACKAGENAME --update apt-offline.sig
  • transfer apt-offline.sig to online machine

  • create a bundle of required packages

apt-offline get --bundle bundle.zip apt-offline.sig
  • copy bundle.zip file to offline machine

  • install required packages

sudo apt-offline install bundle.zip
  • install main package you want
sudo apt install PACKAGENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment