14

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?

2

3 Answers 3

14

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>.

4

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

2
  • 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, 2016 at 2: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, 2019 at 0: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.

2
  • I assume you mean keryx. Your youtube link takes me to a clip called "Expert Cooking" :-)
    – nik
    Feb 23, 2012 at 15:21
  • This is what i get for SUing when ill ;p. Fixed, and thanks
    – Journeyman Geek
    Feb 23, 2012 at 23:33

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.