Grabbing an RPM with yum without installing

How To Download a RPM Package Using yum Command Without Installing On Linux

yum-downloadonly. This plugin adds a –downloadonly flag to yum so that yum will only download the packages and not install/update them. Following options supported by this plugin:

[a] –downloadonly : don’t update, just download a rpm file
[b] –downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp

# yum install yum-downloadonly

# yum update httpd -y --downloadonly --downloaddir=/opt

package already installed, no problem:
yum install –downloadonly –downloaddir=/data/rh5.updates –installroot=/tmp

Leave a Comment