20110225 yumdownloader and yum downloadonly - plembo/onemoretech GitHub Wiki
title: yumdownloader and yum-downloadonly link: https://onemoretech.wordpress.com/2011/02/25/yumdownloader-and-yum-downloadonly/ author: lembobro description: post_id: 65 created: 2011/02/25 10:48:30 created_gmt: 2011/02/25 10:48:30 comment_status: open post_name: yumdownloader-and-yum-downloadonly status: publish post_type: post
yumdownloader and yum-downloadonly
That's right, a couple of packages that let you download packages using yum instead of installing or upgrading them. Nice article on Nixcraft entitled How To Download a RPM Package Using yum Command Without Installing On Linux giving the full scoop.
The simpler of the two is the **yumdownloader**
utility, provided by **yum-utils**
. Install that with:
yum install yum-utils
Using it is as easy as:
yumdownloader perl-ldap
This downloads to your present working directory (pwd).
A bit more flexible is **yum-downloadonly**
, install by executing:
yum install yum-downloadonly
Then you’re ready to go.
For example:
yum update perl-ldap -y --downloadonly
This will download to default directory, /var/cache/yum. To specify a different location:
yum update httpd -y --downloadonly --downloaddir=/var/tmp
Another neat trick the article relates is something I’d forgotten: how to extract a package contents.
rpm2cpio httpd-2.2.3-31.el5_4.2.x86_64.rpm | cpio -idmv
Copyright 2004-2019 Phil Lembo