2

I have a Fedora-installed PC which is disconnected from internet (and there's nothing I can do about it). So I want to download rpm files for various softwares on another PC and then install them later on the former one. So is there a way that I can do that?

On Ubuntu, I used two different ways to achieve this. One is this, "sudo apt-get install --download-only package-name" and then copy the deb files. Another method is using synaptic, use the "Generate package download script" and then download the deb files using that script.

However, I'm yet to find a similar way on Fedora. Can you guys help me?

Any help is appreciated. Thank you.

4

Yes, it is possible, relevant options for dnf are:

  • --downloadonly Download resolved package set without performing any rpm transaction (install/upgrade/erase).
  • --downloaddir=<path> Redirect downloaded packages to provided directory. The option has to by used together with --downloadonly command line option or with download command (dnf-plugins-core).

On recipient machine install downloaded packages dnf install /path/to/rpm

0

The dnf --downloadonly flag will pull down packages to the local cache without installing them. You can also use the dnf download command to download packages to the current directory (and you can do this as non-root). (This is a plugin; docs at man dnf.plugin.download.)

With dnf download --resolve, you will also get any dependencies which are missing on this system. (If your system matches the target one, this will be convenient.)

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.