Download RPM package using yum without installing or updating
If you want to only download an RPM package without installing it, you'll need to install the yum-plugin-downloadonly.noarch package first. This will then add options to the yum command allowing only downloads of RPM packages without installing them.
This is particularly handy if you just want to download a package for extracting single files or viewing it's contents prior to installing them.
Here's how to use it once it's installed:
Install the plugin package using yum:
# yum install yum-plugin-downloadonly.noarch
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package yum-plugin-downloadonly.noarch 0:1.1.30-6.el6 will be installed
–> Finished Dependency ResolutionDependencies Resolved
============================================================================
Package Arch Version Repository Size
============================================================================
Installing:
yum-plugin-downloadonly noarch 1.1.30-6.el6 sl 17 kTransaction Summary
============================================================================
Install 1 Package(s)Total download size: 17 k
Installed size: 21 k
Is this ok [y/N]: y
Downloading Packages:
yum-plugin-downloadonly-1.1.30-6.el6.noarch.rpm | 17 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : yum-plugin-downloadonly-1.1.30-6.el6.noarch 1/1Installed:
yum-plugin-downloadonly.noarch 0:1.1.30-6.el6Complete!
#
Once installed, issue your command to get the RPM:
yum install –downloadonly –downloaddir=./ <RPM / PACKAGE>
Example:
yum install –downloadonly –downloaddir=./
Cheers,
TK