Skip to content

Download rpm using yum without installing

by Ben Hepworth on March 7th, 2012

Sometimes you may have the need to download a rpm, but not actually install it. You can use yum to do this very easily. First, install the yum-downloadonly package:

yum install yum-downloadonly

Then, issue the install command with the –downloadonly flag at the end:

yum install --downloadonly

For example, to download the rpm for apache:

yum install httpd --downloadonly

If you already have the package installed, but just want the rpm, you may need to use reinstall instead of install. Once the command is complete, the rpm(s) will be place in /var/cache/yum/rhel

/var/cache/yum/rhel-/packages

For example, for 64-bit Redhat 5, they will be placed here:

/var/cache/yum/rhel-x86_64-server-5/packages

From → Technology

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

Spam Protection by WP-SpamFree