clean

Remove stale Docktree-managed resources.

Usage

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).

Flags

FlagDescription
--dry-runShow stale resources without removing them
--yesSkip the interactive confirmation prompt (required in non-interactive mode)
--volumesInclude Docker volumes when discovering and removing stale resources

Examples

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