vcspull worktree prune

Remove worktrees that are no longer in your configuration.

Command

Usage

usage: vcspull worktree prune [-h] [-f FILE] [-w DIR] [--json] [--ndjson]
                              [--color {auto,always,never}] [--dry-run]
                              [pattern ...]

Positional Arguments

repo_patterns pattern

patterns / terms of repos, accepts globs / fnmatch(3)

Default
None

Options

-f, --file FILE

path to config file (default: ~/.vcspull.yaml or ./.vcspull.yaml)

Default
None
-w, --workspace, --workspace-root DIR

filter by workspace root directory

Default
None
--json

output as JSON

Default
False
--ndjson

output as NDJSON (one JSON per line)

Default
False
--color

when to use colors (default: auto)

Default
auto
Choices
auto, always, never
--dry-run, -n

preview what would be pruned without making changes

Default
False

Basic usage

Prune orphaned worktrees:

$ vcspull worktree prune '*'

Prune scans all git worktrees registered with each matched repository and removes any that don’t appear in the current config. Repositories that have had their worktrees config removed entirely are also scanned.

Dry run

Preview what would be removed:

$ vcspull worktree prune --dry-run '*'

Filtering

Prune worktrees for specific repositories:

$ vcspull worktree prune 'myproject'

JSON output

$ vcspull worktree prune --json '*'

NDJSON output

$ vcspull worktree prune --ndjson '*'