Info: Counting total number of packages under Debian Linux
Purpose: To count the total number of packages in the Debian distribution.
I have read on many websites that Debian has the most number of packages than any other Linux distribution out there. Also as per Debian, there are 18000+ packages in Debian. This got me curious and I decided to query the total number of packages that are currently actually there in Debian. The 18k+ estimate is more than one year old and therefore I think it is not very accurate. Upon doing some research I found that there is not direct way by which you can query the number of packages in real-time. Therefore I had to rely on the compressed text files on Debian’s package website.
I decided to check the number of packages that are there in current stable (etch), testing (Lenny) and unstable (Sid) branch and further breaking the numbers into main, contrib and non-free sections. Here are some statistics and if you are a Debian fan then you are going to enjoy this.
Debian Stable (Etch)
Total packages: 23143
Break-up of packages section-wise:
Main: 22488
Contrib: 333
Non-free: 322
Debian Testing (Lenny)
Total packages: 28278
Break-up of packages section-wise:
Main: 27534
Contrib: 364
Non-free: 380
Debian Unstable (Sid)
Total packages: 30448
Break-up of packages section-wise:
Main: 29632
Contrib: 349
Non-free: 467
I have to say that the above numbers are pretty impressive. Actually Debian is a very conservative distribution (and I like that) and hence it has mentioned 18000+ packages only as opposed to 23000+. “Under promise, Over deliver”. I don’t think there is any other distribution which comes any where close to Debian in terms of packages that it has to offer.
I have written a small shell script which basically spits out the numbers. I still need to do some touch ups and then I will post the script on web. However, I can be little bit off in my count because of formatting issues (of the downloaded text file) and errors in command. Just in case if you get curious too and try to do this yourself and if the numbers don’t match then please let me know. I will correct myself.
As usual, please leave a comment/feedback if you have any. Comments encourages bloggers to post more and keep their spirits high.
Also don’t forget to rate this post below.
Download the latest demo of testking 640-822 questions and testking 640-816 practice exam to prepare and pass real exam on time. Become IT expert with testking 70-649 prep course.


Email Subscription









January 2nd, 2009 at 7:31 am
[...] It has an extremely powerful package management system and a rich selection of available software. Recent counts show that the latest stable version has over 20,000 packages in the main repository and the latest [...]
January 11th, 2009 at 7:00 pm
There are “only” 24769 packages in sid at the moment…
Reply to this comment
Kushal Reply:
January 11th, 2009 at 11:08 pm
Hi Octy,
Sid is pretty volatile branch although currently it is pretty stable because testing (Lenny) is in Freeze state. So I don’t expect such a huge difference in number of packages – around 6000. I will recheck it again. Just out of curiosity how (what method) did you calculate the number of packages.
Thank you for your comment.
Reply to this comment
January 12th, 2009 at 1:47 pm
Synaptic?!? :) it’s much easier… just change the repository, update, and it will show you the number of packages…
Reply to this comment
Kushal Reply:
January 12th, 2009 at 6:47 pm
Hi Octy,
It just struck me as to why there are differences in our numbers – I think it is because of the architectures. What architecture do you have? x86, amd64, armel, etc? Debian supports as many as 14 architectures and the packages are not same for all architectures.
So for example, package A might be in x86 but might not be in amd64. I think Synaptic counts the number of packages that are available in the architecture whereas I calculated the total number of packages across all architectures..
This is how I did:
Let’s say we want to calculate for sid – Download this file:http://packages.debian.org/unstable/allpackages?format=txt.gz
and then give the command:
wc -l
Subtract 6 (because of the header in the beginning) from the total that you get.
I will continue to re-check my calculation and my method. It could be that I might be slightly off.
Reply to this comment
January 12th, 2009 at 8:35 pm
I am on an x86… are there packages in other architectures and not in i386? 6000 packages?
Reply to this comment
Kushal Reply:
January 13th, 2009 at 11:19 am
There are but you are right – the number cannot be 6000+. I think I need to better define as to what those number constitutes. What I will do is update that post with some more refined information and will acknowledge you bringing this out to attention.
Thank you again for your interest.
Reply to this comment
January 17th, 2009 at 7:41 am
[...] to Kushal’s post about counting total number of Debian packages, he concluded that sid currently has more than [...]
February 26th, 2009 at 11:07 pm
[...] bardzo pot??nym systemem zarz?dzania pakietami i ma bogaty wybór dost?pnego oprogramowania. Ostatnie dane pokazuj?, ?e w najnowszej stabilnej wersji posiada ponad 20000 pakietów w g?ównym repozytorium [...]
April 3rd, 2009 at 9:42 am
hey can i buy a link in your link section for a couple bucks via paypal? i want to get like minded readers – let me know please :)
Reply to this comment
July 7th, 2009 at 10:17 am
It would be cool if you where able to do things like consolidate…
acpi-modules
acpi-modules-2.6.26-2-486-di
acpi-modules-2.6.26-2-686-bigmem-di
acpi-modules-2.6.26-2-amd64-di
…to just one package, since the end-user is probably more concerned with the number of unique packages the distribution offers. You could call this metric ‘number of unique programs offered by Debian’, doing things like grouping -doc, -dev, and consolidating all the ‘same package, just compiled for a different arch (see atl2-modules)’ packages. Definitely splitting by arch is useful, too, though this is a big task.
Reply to this comment
July 18th, 2009 at 1:27 am
This gives a more accurate estimate of the number of *applications* offered by Debian.
tail -n +7 allpackages | cut -d’ ‘ -f1 | cut -d’-’ -f1 | uniq | wc -l
Stable: 11448
Testing: 12194
Unstable: 13012
This is still incredibly impressive. The number of *packages* indicate the hard work of the developers/maintainers while the number of *applications* should be more useful for end-users.
Reply to this comment
Admin Reply:
August 5th, 2009 at 12:31 pm
Hi Jonathan,
You might be right. My first estimates regarding the number of packages was pretty naive. Since then I have got a lot of different views on the number of packages and I am planning to write a updated POST on this one.
Thanks for your comment and suggestion!
Reply to this comment
July 28th, 2009 at 4:03 pm
[...] bardzo pot??nym systemem zarz?dzania pakietami i ma bogaty wybór dost?pnego oprogramowania. Ostatnie dane pokazuj?, ?e w najnowszej stabilnej wersji posiada ponad 20000 pakietów w g?ównym repozytorium [...]
August 5th, 2009 at 12:37 pm
You might also want to check out oswatershed.org and contact the head of that website – he might have useful scripts.
Reply to this comment
November 19th, 2009 at 1:57 pm
,..] linux.koolsolutions.com is one must read source of information on this issue,..]
Reply to this comment