git doesn’t really take up 100MB

Valent’s post on finding the largest installed rpms sparked my interest.  I’m almost obsessive about reducing my set of installed packages.  But when I saw this output, I was a bit shocked.


While I’m not surprised the and java take up huge amounts of disk space, I was amazed that git does.  After all, most of git is hard linked to /usr/bin/git.  I whipped up a quick awk script to add based on unique inodes.

#!/usr/bin/awk -f
BEGIN { s = 0; lasti = 0 }
{ if ( lasti != $1 ) { s += $6; lasti = $1 } }
END { print s }

Then ran it on git like so:

[nstraz@tin ~]$ rpm -ql git | xargs ls -lid | sort -n | ./countsize.awk

Roughly 16MB vs 100MB.  That makes more sense.



  1. Posted August 10, 2009 at 12:04 pm | Permalink

    This is what you want:

    rpm -q –qf ‘%{archivesize}’ git

  2. Panu Matilainen
    Posted August 11, 2009 at 5:43 am | Permalink

    The rpmbuild version used to build that git package miscalculated hardlinked files, see The bug has been fixed but git hasn’t been rebuilt so the size still appears crazy.

  3. Posted August 11, 2009 at 7:57 am | Permalink

    Right, this was reported at:

    I noticed in when testing my fslint package as it has a function for listing packages by installed size which you may be interested in.
    You can get it at or
    yum install fslint

%d bloggers like this: