24052023, 13:05 How to Download RPM Packages Without Installing on RHEL 8
How to Download RPM Packages Without Installing on
RHEL 8
Published on: February 20, 2022 by Pradeep Antil
DNF is a package management command line utility on RHEL distributions like Red Hat Enterprise Linux,
CentOS Stream and Fedora. Usually, DNF or Yum command is used to install, update and remove rpm packages
from command line.
Apart from this, dnf can also be used to download packages locally on the system without installing. In this
‘guide, we will learn how to download rpm packages without installing them on RHEL 8.
Note: There are some setups where we don’t have internet connectivity on RHEL systems, but we have a task to
install some packages, may be from some external repository like EPEL. So, in this situation, downloading RPM
packages becomes handy. We can download the packages on RHEL systems where we have internet
connectivity and then will transfer those packages to remote systems.
Let’s suppose we want to download bind and bind-utils packages along with its dependencies. Login to RHEL 8
system, open the terminal and run following commands.
Note: Below steps are also applicable for Rocky Linux 8, CentOS 8 stream and AlmaL inux OS 8.
Downloading RPM Packages Without Installing
1) First create a directory where we will download packages.
$ mkdir bind-pkg
2) Run dnf command with -downloadonly and ~downloaddir options
$ sudo dnf install --downloadonly --downloaddir bind-pkg bind bind-utils
In above command, ~downloadonly will instruct dnf command to download bind packages along with its
dependencies without installing it. -downloaddir will instruct dnf command to download packages to directory
“bind-pkg’.
Output of above command,
hitps: www tnuxbuzz comldownload-packages.withoutnstaling-onshel! 12410512028, 13:08 How to Download RPM Packages Without Installing on RHEL 8
Eiigratuien rape tear ren Ctra?
3) Verify the downloaded packages using Is command,
$ 1s -1 bind-pkg/
Stn cns aU msackucn
preter)
ser] Ce eee Cee
ain reece ete Ce ar
ices Sicmecragtss eel
aires’ everest
Presse)
amas Ree Ce ee
ar
r
ft
ri
i
rt e
eras Pea tev eaters Cs eC Ree)
ft
i
A
A
are oae ss 4 7 Ee ae resem CeCe
acess 201 Uibmaxminddb-1.2.0-10.e18. x86_64. rpm
ices’ een eee are
aie eet? rien sure eee nC ar)
em
a
Now we can make an archive file using tar command and then we can transfer it to the system where we want to
install bind server.
$ tar zcpvf bind-packages.tgz bind-pkg/
hitpswww.inuxbuzz. comidownlead-packages-withoutnstaling-on-rhal2410512028, 13:05 How to Download RPM Packages Without Installing on RHEL 8
[sysops@rhel8 ~]$ tar zcpvf bind-packages.tgz bind-pkg/ “——
Pye cg
ee aU Eee ROC e a)
bind-pkg/bind-libs-9.11.26-6.e18.x86_64.rpm
bind-pkg/bind-libs-lite-9.11.26-6.e18.x86_64. rpm
bind-pkg/bind-license-9.11.26-6.e18.noarch.rpm
nd-pkg/bind-utils-9.11.26-6.e18.x86_64. rpm
bind-pkg/fstrm-0.6.1-2.e18.x86_64.rpm
bind-pkg/geol ite2-city-20180605-1.e18 .noarch.rpm
Pe he ee aee yee per sc eee)
Ure AGC runt Ss ee cee Ce MY aL)
DU ete eee ee ieee |
bind-pkg/python3-bind-9.11.26-6.e18.noarch.rpm
[sysops@rhel8 ~]$ 1s Pea lol ct en ee
a eas 1 sysops sysops 24925248 Feb 20 11:20 bind-packages.tgz
[sysops@rhel8 ~1$ ff
While downloading the packages using dnf command, if we don’t specify —downloadidr option then packages
will be downloaded to ‘/var/cache/dnffbaseos-xxxxxxx/packages’’, ‘/var/eache/dnffappstream-
xxxxx/packages’ and ‘/var/cache/dnf/epelxxxxxxxx/packages)”,
sops@rhel Cree STS)
root 4 r ce Car
ers ecm
rs erin ens
arg 98:40 apr-utit-opensst
ea ree
era reer
ers Oe
ers Permteey ci
rere a)
root re eee)
rg racer Sececoci
root Eat) a we
boda carpeeenie at ere
eed Cert) ary
Se eae)
eee
‘That’s all from this guide. I hope you have found it informative. Please don’t hesitate to share your queries and
feedback in below comments section.
hitpswww.inuxbuzz. comidownlead-packages-withoutnstaling-on-rhal 3