CentOS /RHEL:Yum Download RPM Packages Without installing

How Do I just only download RPM Packages without installing them immediately under CentOS /RHEL/Fedora system? Sometimes, I just would like to download the packages using yum command and not install those matched packages in the YUM repositories. In this post, I will show you how to use yum download RPM packages:

CentOS Yum Download RPM Packages

Before I wrote a post about Yum installing package, you can find the below lines from the output of “yum install” command, then need your confirm if the installaion process will be continued. at this time, if you want to continue installation, then pressing “y”, if not ,pressing “N”. there is another option named “d”, what’s mean for this option? this option will control the installation process to only download the packages without installing them.

To  download a RPM package named wget, type:

yum install wget

then pressing “d” option.

[root@devops Desktop]# yum install wget

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.nwsuaf.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package wget.x86_64 0:1.14-10.el7_0.1 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package       Arch            Version                   Repository        Size

================================================================================

Installing:

wget          x86_64          1.14-10.el7_0.1           updates          545 k

Transaction Summary

================================================================================

Install  1 Package

Total download size: 545 k

Installed size: 2.0 M

Is this ok [y/d/N]: d   ======> press "d"

Background downloading packages, then exiting:

wget-1.14-10.el7_0.1.x86_64.rpm                            | 545 kB   00:10

exiting because "Download Only" specified

To check if the package is downloaded, type:

[root@devops Desktop]# find /var/cache -name wget*

/var/cache/yum/x86_64/7/updates/packages/wget-1.14-10.el7_0.1.x86_64.rpm

By default, the downloaded packages via yum will be stored under “/var/cache/yum/$basearch/$releaserver/packages” directory.

You might also like:

Sidebar



back to top