Download RPM packages for command which is already installed

It is possible to download the packages of an RPM which is already installed using the --downloadonly switch. I am not sure why yum doesn’t check this setting before checking whether the package is already installed, but I guess it could be caused by the underlying architecture of the tool.

Anyway, all you need to do is to tell yum to reinstall the package:

yum --downloadonly --downloaddir=/tmp/rpm_files/ reinstall package_name

Of course, yum will not know which dependencies were installed just for this package, so if you take the RPMs and try to install them on a different system, some dependencies might be missing. There are ways to explore the whole dependency graph and I’m sure this was already described elsewhere on SE.

Leave a Comment