Remove stale Docktree-managed resources.
docktree clean [flags]
Discovers and removes stale or orphaned resources: port allocations, containers, networks, and optionally volumes for worktrees that are missing, gone, or idle (>14 days).
| Flag | Description |
|---|---|
--dry-run | Show stale resources without removing them |
--yes | Skip the interactive confirmation prompt (required in non-interactive mode) |
--volumes | Include Docker volumes when discovering and removing stale resources |
Preview what would be cleaned:
docktree clean --dry-run
Clean up (with confirmation):
docktree clean
Clean up including volumes, no prompt:
docktree clean --yes --volumes