GIT-PACK-REDUNDANT(1)
π
GIT-PACK-REDUNDANT(1) β the girlies' guide to git-pack-redundant
okay so bestie, welcome to the git manual page for git-pack-redundant β¨ you found it, you're here, let's get into it π«Ά
β¨ NAME β¨
git-pack-redundant β find redundant pack files π like, it goes looking for packs that are literally extra
π SYNOPSIS π
git pack-redundant [--verbose] [--alt-odb] (--all | <pack-filename>...)
that's the whole vibe, no cap π
π WARNING π
okay so this is the part where I have to be a little serious with you π
git pack-redundant has been deprecated and is scheduled for removal in a future version of Git. like. it's on the way out, bestie. and here's why, because the reason matters:
it can only remove entire duplicate packs β not individual duplicate objects. so it's generally not a useful tool for reducing repository size. that's the whole point of the thing and it can't really do it, which is givingβ¦ not slay π«
you're way better off using git gc to do this, which will put objects into a new pack, removing duplicates. git gc ate and left no crumbs, honestly π
also important: running pack-redundant without the --i-still-use-this flag will fail in this release β οΈ like, it just won't run. that's a real thing, not a bit.
and hey β if you genuinely believe you have a use case for which pack-redundant is better suited, and you oppose this removal, please contact the Git mailing list at git@vger.kernel.org[1]. more info about the list is available at https://git-scm.com/community π they want to hear from you fr fr
πΈ DESCRIPTION πΈ
so what does this program do? it computes which packs in your repository are redundant. that's it, that's the job π
the output is suitable for piping to xargs rm β if you are in the root of the repository. (read that again, the root, bestie, don't come for me later π)
git pack-redundant accepts a list of objects on standard input. any objects given will be ignored when checking which packs are required. and that is what makes the following command so useful when you want to remove packs which contain unreachable objects β¨:
git fsck --full --unreachable | cut -d ' ' -f3 | \ git pack-redundant --all | xargs rm
it's giving pipeline main character energy π
π OPTIONS π
--allβ processes all packs. any filenames on the command line are ignored. like, don't even bother typing them, she's not listening π--alt-odbβ don't require objects present in packs from alternate object database (odb) directories to be present in local packs. so she's chill about the alt odb situation π¦--verboseβ outputs some statistics tostderr. has a small performance penalty. worth it for the tea, honestly β but yes, it costs you a lil performance, keep it real
π¦ SEE ALSO π¦
the whole friend group π
π GIT π
part of the git(1) suite β¨ she's family
π NOTES π
git@vger.kernel.orgmailto:git@vger.kernel.org
okay that's the page!! π this was written for Git 2.56.0, dated 2026-09-27 β like, remember that date, it's on the tag π·οΈ and yeah, it's GIT-PACK-REDUNDANT(1), the icon that she is π
β¨ go use git gc though, fr fr π«Ά
π¦ where this page comes from
- arch rolling: git 2.56.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms