Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to download all dependencies with yumdownloader, even if they are already installed?

I'm trying to create a local repo and only want to include the packages we need.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can use repotrack instead like this:

repotrack -a x86_64 -p /repos/Packages [packages]

Unfortunately there is a bug with the -a flag (arch). It will download i686 and x86_64.

Here's how to fix it:

if opts.arch:
    #archlist = []
    archlist = opts.arch.split(',') # Change to this
    archlist = rpmUtils.arch.getArchList()

You can use repoquery to get a list of group packages:

repoquery --qf=%{name} -g --list --grouppkgs=all [groups]

Which you can feed into repotrack:

repoquery --qf=%{name} -g --list --grouppkgs=all [groups] | xargs repotrack -a x86_64 -p /repos/Packages
share|improve this answer
Updated to use repotrack instead. repoquery's --requires --resolve option doesn't work recursively for deps. –  Luke Oct 13 '12 at 1:32
add the --recursive option to the repoquery command to get it work recursively. –  ZaSter May 7 '13 at 22:40
Fixing repotrack the way suggested above did not work for me: no package was downloaded for x86_64 arch. Anyway +1 for a good tip: with repotrack one could download both i386 and x86_64 and filter out unnecessary part. –  Alexander Vasiljev Jun 1 at 7:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.