# pal cli worktree

Source: https://pal.konvert7.com/docs/cli/worktree

Clean up this repo's git worktrees

```bash title="Usage"
pal cli worktree <command>
```

## pal cli worktree prune [#pal-cli-worktree-prune]

Remove clean worktrees whose branch is merged and deleted on the remote; branches stay

```bash title="Usage"
pal cli worktree prune [options]
```

| Option | What it does |
| --- | --- |
| `--dry-run` | List them without removing |

It runs git fetch --prune first, and each removal prints its undo. The repo line in the prompt names merged worktrees.

This is the sweep for worktrees the progress tree does not know. A worktree that appears during the work is attached to the active node, and is removed the same safe way when that node's PR for its branch merges or the node is done; pal cli progress done lists the ones it kept and why.