Downloading Fedora and CentOS source code with yumdownloader

One of the things I really like about Linux is the availability of source code for the kernel and userland applications. If I encounter an issue where a program is misbehaving for some given reason, I can grab a source RPM from a network repository and start poking around to see what is going on. Fedora and CentOS provide the yumdownloader utility to download binary RPMs, and source RPMs when the “–source” option is specified:

$ yumdownloader –source kernel

Loaded plugins: refresh-packagekit
Enabling updates-source repository
Enabling fedora-source repository
kernel-2.6.31-0.17.rc0.git15.fc12.src.rpm                                    |  67 MB     05:28     



Once a source RPM is downloaded, you can install it and begin looking through the source. Sweet!

2 thoughts on “Downloading Fedora and CentOS source code with yumdownloader”

  1. I’ve discovered this command no longer works on CentOS, generally.

    For at least the time being (and since a few months ago), the CentOS team has decided not to make the C5 source RPMs available in any yum-compatible medium, and have stopped shipping them alongside the binary RPMs to mirror for all but C6.

    I think it’s not yet a GPL violation but I reported the bug because of the reduction in usability a week or 3 ago. No one’s been available to generate the meta-data yet, but it’s a simple task and should be addressed soon.

  2. Certainly doesn’t work on Centos 6 (does work on Fedora 16 though) which make installing certain packages like VirtualBox a bit painful.

Leave a Reply

Your email address will not be published. Required fields are marked *