Skip to content

The picker

cloudranger edited this page Nov 14, 2026 · 1 revision

Run zap with no command to choose what to remove by hand. zap --all covers every repository under your scan roots.

The picker: one kept worktree in ~/dev/api, three selected in ~/dev/my-app

Worktrees zap would remove start selected ([x]). zap dims the ones it keeps and shows the reason at the end of the line. Active worktrees don't appear at all.

Keys

Key Does
↑ ↓ Move
space Select or unselect a worktree
a Select or unselect a whole repository
[ ] Jump to the previous or next repository
e Show every safety check for the worktree under the cursor
i Opt the repository in (writes .zap)
enter Review the selection
q Quit without changing anything

Details

Press e on any row to see its status, size, what zap would do, and every safety check:

Details for fix-login: merged, 386 MB, every safety check passes

On a kept worktree, the failing check is marked ✗:

Details for the Cursor worktree: keep-ignored fails because it holds an ignored .env

esc goes back to the list.

Review and zap

enter shows what will happen to each selected worktree:

Review screen: zap 3 worktrees, about 1.2 GB, with what happens to each

y zaps them and n takes you back to the list.

The picker after zapping: three worktrees zapped, 1.2 GB freed

Idle worktrees

If a repository's .zap adds the idle rule, unmerged worktrees nobody has touched for a while (30 days by default) show up in the picker, unselected. Selecting one removes the worktree but keeps its branch. zap clean never removes idle worktrees.

Clone this wiki locally