Install yum packages without internet connection

18,871

Yes, you can use the --downloadonly command.

Run yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils --downloadonly it will prompt to install but it wont and will instead show;

yum install procmail --downloadonly
Installed size: 385 k
Is this ok [y/N]: y         
Downloading Packages:
exiting because --downloadonly specified

By default the downloaded files are in; /var/cache/yum/

There are some more details here on the RedHat page.

Share:
18,871
Aira
Author by

Aira

Updated on June 21, 2022

Comments

  • Aira
    Aira almost 2 years

    Is there any way to download all packages from this line, save them locally and then install them to a machine without an internet connection?

    yum install -y qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
    
  • Israel Varea
    Israel Varea almost 6 years
    In case you want to download to a different directory: yum install --downloadonly --downloaddir=<directory> <package>