wt-cleanup

Identify and remove merged or stale Git worktrees interactively.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/michael-menard/monorepo --skill wt-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wt-cleanup
Source: https://github.com/michael-menard/monorepo/tree/main/.claude/skills/wt-cleanup
Command: npx skills add https://github.com/michael-menard/monorepo --skill wt-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and remove merged or stale Git worktrees that clutter repos and waste disk space.

Core Features & Use Cases

  • Interactive cleanup: List all worktrees, identify merged branches, and selectively remove them.
  • Safe housekeeping: Prunes git metadata after removal to keep references clean.
  • Use Case: When a project spawns multiple feature branches with dedicated worktrees, run this skill to remove those that have already been merged into main.

Quick Start

Use the wt-cleanup command to identify and remove stale worktrees interactively.

Frequently Asked Questions about wt-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up merged git worktrees to reclaim disk space?

To clean up merged git worktrees, you can run an interactive process that lists all worktrees, detects which branches have been merged, prompts you to select stale ones for removal, and prunes git metadata references.

What is the best way to remove stale worktrees from a repository?

The best way to remove stale worktrees is to use a selective removal process that identifies merged branches and interactively prompts you to delete them, ensuring safe housekeeping by pruning git references afterward.

Can I selectively delete only merged git worktrees without removing active ones?

Yes, you can selectively delete only merged git worktrees through an interactive selection process that lists all worktrees, detects merged branches, and prompts you for removal, keeping active worktrees intact.

Does removing git worktrees also prune repository metadata?

Yes, removing git worktrees through a safe housekeeping process prunes git metadata after removal, keeping repository references clean and preventing stale worktree data from cluttering your environment.

When should I use a git worktree cleanup tool?

You should use a git worktree cleanup tool when a project spawns multiple feature branches with dedicated worktrees and you need to remove those that have already been merged into main to reclaim wasted disk space.

Why do merged worktrees waste disk space if left undeleted?

Merged worktrees waste disk space because they remain as separate working directories on your drive even after their branches are merged into main, requiring interactive cleanup to remove the stale directories and prune metadata references.