I am a Homebrew user and have noticed very large files. It seems to have something to do with git, I searched with Brave Search for "Git pack format" but didn't understand exactly why they are so big and are on every MacBook with Homebrew installed.

du -sh /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-771e63086750c49b4fd081c9c622ab26df8e0ebd.pack
521M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-771e63086750c49b4fd081c9c622ab26df8e0ebd.pack

du -sh /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/*  | sort -h  | tail -n 5
1.3M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-2b3283474b544ba3bf85a321701bbf10a228ea33.pack
1.3M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-c7ee9bb296a5a4d13072b80e2e1ce7ba26e49e1a.pack
1.4M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-08cf158b3c8204179e6f63446d70c89a4dd7a48c.pack
 36M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-771e63086750c49b4fd081c9c622ab26df8e0ebd.idx
521M    /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-771e63086750c49b4fd081c9c622ab26df8e0ebd.pack

1 Answer 1


The relevant documentation from git is https://git-scm.com/book/en/v2/Git-Internals-Packfiles

Basically they contain the history of all the files that have and are in the repository.

This can be limited by choosing just the recent versions of the files when you clone the repository, ie create it on your machine.

The details of using git are off topic on this site try StackOverflow - but a quick search gives https://stackoverflow.com/a/6358656/151019 saying you have to rewrite history if you wanted to reduce the size of an existing repo and that is not going to be practical for the HomeBrew repo - so I think you'll need to reclone the repo,

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .