If you run several coding agents in parallel, each Git worktree can collect its own dependencies, build products and test output. Start with Git's inventory. Then decide whether to remove a finished checkout or keep it and reclaim only the generated files.
Ask Git what is still attached
In openai/codex#54891, a user reported stale records and several gigabytes of checkouts under ~/.codex/worktrees. Check the worktree entries in Git and the size of the actual directories. Review any local changes before considering removal.
From your main repository, run git worktree list. For a worktree you recognize, copy its exact path and inspect that checkout:
worktree="/path/to/the/worktree"
git -C "$worktree" status --short --untracked-files=all
git -C "$worktree" status --short --ignored
du -sh "$worktree"
Use the real path in place of the example. The first status check includes untracked files, and the second also shows ignored output. An empty status is only part of the decision. Confirm that the work is already preserved in the right branch or reviewed pull request, the original commits or their changes can be recovered, and the agent or application that owns the checkout is finished. A squash merge can incorporate the changes under a different commit ID.
Git's worktree manual documents git worktree remove "$worktree". Use the normal command for a finished linked worktree after reviewing the files you still need. If Git refuses, check the reason and preserve the checkout until it is understood. For a checkout an app manages, use that app's archive or remove control where available.
Check whether dependencies are the actual cost
On a developer's Mac measured November 27, 161 worktrees accounted for 150 GB, of which 68 GB was dependencies and build output. A separate November discussion described sharing dependencies across agent worktrees with pnpm. Treat both as examples. With hard links and shared stores, a folder's reported size can differ from the space the Mac gets back after removal.
If a worktree is still needed, check the project's normal build or package-manager workflow. Rebuildable output in that checkout may be the better target. Keep ignored files with local secrets, manual test data, or expensive fixtures that the project cannot recreate. Measure available space before and after one action so you know which choice helped.
Let Mint surface finished worktrees for review
Mint can recognize supported agent worktrees and distinguish eligible finished checkouts from ones that need review. It checks for preserved commits and looks for local-only work before offering removal. Use the scan to find a candidate and check the path. For a currently active checkout, start with the project's own clean or rebuild workflow.