lopper

Find stale Git worktrees across all your repositories, see their disk usage and status, and clean up the ones you no longer need.

install

curl -fsSL https://lopper.dev/install.sh | sh
irm https://lopper.dev/install.ps1 | iex
go install github.com/shinokamix/lopper/apps/lopper/cmd/lopper@latest

why lopper

Worktrees pile up all over the disk. You make some by hand, and coding agents make one per task, each tool in its own folder. Every worktree has its own node_modules, .venv or target/, and can take up gigabytes.

Git lists them one repository at a time, and you have to check each one yourself before deleting it. lopper finds them all and shows each one's size and status, so you know what's safe to delete.

commands

lopper              # open the terminal UI
lopper ~/code       # scan a specific directory
lopper scan --json  # print scan results as JSON
lopper rm ../wt     # remove a worktree if safe
lopper update       # update to the latest release

faq

Can it delete unfinished work?

Not without asking. lopper warns you about uncommitted or unmerged work, and lopper rm needs --force for it.

How does removal work?

lopper checks the worktree again right before removing it, in case it changed since the scan. Then it runs git worktree remove, which deletes the folder and Git's record of it but keeps the branch. There is no trash, so the folder is gone for good.

Where does it look?

Everywhere under your home and temp folders, hidden ones too. lopper doesn't look for specific tools, so it finds worktrees from Claude Code, Codex, Cursor, T3 Code, Orca, Paseo or whatever comes next.

Does it go online?

Only to check GitHub for updates. LOPPER_NO_UPDATE_CHECK=1 turns that off.