15

How can I download ubuntu packages from online repos thhrough windows to install them later on an offline ubuntu machine?

this is related to this question: Ubuntu repository download iso

if there are any ready-made iso's for 11.10 that include device drivers, language packs & software packages would be great for ubuntu users without an internet connection.

any ideas?

ma-aa
  • 151
  • 1
  • 1
  • 3
  • You'll find some good options on the **AskUbuntu** Question [How can I install software offline?](http://askubuntu.com/q/974/1352). It has high votes for [keryx](http://keryxproject.org/) and a tutorial reference too. – nik Feb 23 '12 at 15:16
  • https://stackoverflow.com/questions/13756800 – phoenix Sep 10 '19 at 15:41

3 Answers3

15

For similar needs, I run a small virtual machine in my windows machine. To download packages without installing you can use apt-get download <package_name>. The command will download the package to the directory that you run the command. You can then copy the packages to the host, then a flash drive, lastly to the machine that you use.

I know this may not be the most elegant solution but at least works for me.

Oh, I forgot: If you need dependency checking, you can run apt-get -s install <package_name>, copy the dependency line and just paste to apt-get download command.

Update 2: I looked to the manpage of the apt-get. It has a switch called --download-only. You can pass this to install & apt-get will get all the packages for you but won't install them. You can find your packages in /var/cache/apt/archives. An occasional apt-get clean will delete the files from the directory, so you can get the packages you want easily.

Update 3: To install the packages obtained with method in Update 2, you need to put these packages again in /var/cache/apt/archives in the offline machine. If you want to install packages you got with apt-get download, you can use dpkg -i <package_file>.

bayindirh
  • 343
  • 4
  • 11
4

You can search for and download them right on http://packages.ubuntu.com/

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
  • It's not really feasible since it doesn't download any dependencies and in Linux every dependency has a ton of dependencies of its own. That's why they have that notice strongly encouraging you not to download packages that way, but to use a package manager instead. – y0gapants Oct 28 '16 at 02:10
  • Of course it is feasible. You just have to know what packages you need. Automatic dependency management was not a requirement of the original question. The site above even tells you what the dependencies are for every single package. Also, not *every* dependency has "a ton" of other dependencies. If you know what you are installing and what it needs in order to work, you will be a lot better off when things go wrong. – Kallaste Feb 22 '19 at 00:46
1

While i haven't tested it yet keyrx should allow you to create a manifest of things that need updating, download them on another system, and install them. I'm not sure if it handles packages that arn't already on the system however.

Journeyman Geek
  • 127,463
  • 52
  • 260
  • 430