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.











Free 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 [...]