---
id: mac-storage-basics.how-do-i-shrink-a-large-git-repository
url: https://storagestudio.us/faq/mac-storage-basics/how-do-i-shrink-a-large-git-repository
category: "Mac storage basics"
subcategory: "Developer tools"
question: "How do I make a large Git repository use less space?"
alt_questions:
  - "git repo too big mac"
  - "git gc reduce size"
  - "git lfs storage"
  - "clean git objects"
  - "large .git folder"
short_answer: "Run git gc, prune stale branches, and preview untracked junk with git clean -n before removing it. Large committed binaries stay in history unless moved to Git LFS."
tags: ["git", "developer", "repository"]
related: ["https://storagestudio.us/faq/mac-storage-basics/how-do-i-clean-up-node-modules-folders"]
applies_to: "all"
last_reviewed: 2026-10-01
---

# How do I make a large Git repository use less space?

Start with housekeeping: `git gc` packs and cleans up the repository's objects, and `git remote prune origin` plus deleting merged branches removes leftovers. `git clean -n` previews untracked files (build output, logs) you could remove with `git clean -f`.

If large binary files are committed, the history keeps them; moving them to Git LFS or rewriting history is a bigger, team-level decision. For old projects you just want to keep, archive the whole folder to an external drive.
