I'd like to know how many binary and source packages Red Hat provides with their current RHEL 6.4 Release.

  • 2
    if you're a subscriber, maybe you can just enable update and source repositories and execute yum list > package-list.txt, then count lines of the file? – LiuYan 刘研 Mar 1 '13 at 12:11
  • If not, look at the package list for CentOS. But remember that CentOS doesn't have separate "server" and "workstation" setups, all packages are in the same repository. In any case, raw number of packages is meaningless, what you should look at is if what you need is available (and also what you reasonably might need in the future). – vonbrand Mar 1 '13 at 13:00
  • @vonbrand: sure, the raw package number is not really important. I just need it for some statistics. – tlo Mar 1 '13 at 15:13
  • @LiuYan刘研: Yeah, thought about that one, too. Probably the best way. For source packages I think I found a solution with some shell/perl magic: wget -q -O - http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/ | grep 'src.rpm' | perl -p -e 's,.*href="([a-zA-Z0-9-_.+]+?)-[0-9].*".*,$1,' | sort -u | wc -l – tlo Mar 1 '13 at 15:16
  • Alan Robertson once said: "There are lies, dammed lies and there is statistics". What statistics are these? This question does not make any sense to me... – Nils Mar 2 '13 at 21:26

For the record, there is no easy way to get the number of packages in RHEL. As Nils and vonbrand pointed out, it is important to say, that it does not say anything about the distribution and that there are a lot of additional channels/repos in RHEL.

Nevertheless, to answer the orignal question, this is what I came up with (run on a RHEL 6.4 system):

  • Binary packages:

    yum list | egrep "(rhel-x86_64-server-6|RedHatEnterpriseLinux)" | wc -l

    --> 3742 packages

  • Source packages:

    wget -q -O - http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/ | grep 'src.rpm' | perl -p -e 's,.*href="([a-zA-Z0-9-_.+]+?)-[0-9].*".*,$1,' | sort -u | wc -l

    --> 2187 packages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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