# Git Worktree Cleanup At Scale

> Identify and remove stale git worktrees blocking branch deletion in multi-repo environments

- Skill: `vamseeachanta/git-worktree-cleanup-at-scale` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/git-worktree-cleanup-at-scale`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/git-worktree-cleanup-at-scale/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/git-worktree-cleanup-at-scale

---


# Git Worktree Cleanup at Scale

Worktrees are lightweight working directories sharing a `.git` store, useful for parallel agent work. However, stale worktrees block branch deletion and consume disk space. List active worktrees with `git worktree list`, identify ones on merged/obsolete branches, then remove with `git worktree remove <path>` before deleting the branch. This is especially critical in automation-heavy repos where agent sessions leave behind worktrees. Implement automated cleanup hooks to prevent accumulation.
