Skip to main content
Delete a worktree and optionally its associated branch without launching the TUI. Auto-detects the current worktree from the working directory. Automatically deletes the associated branch if the worktree directory name matches the branch name.

Syntax

lazyworktree delete [options] [worktree-path]

Options

worktree-path
string
Optional worktree path, branch name, or directory name to delete. If not provided, auto-detects from the current working directory.
--no-branch
boolean
Skip branch deletion entirely (even if worktree name matches branch name).
--silent
boolean
Suppress all progress messages to stderr. Useful for scripting and automation.

Examples

# Delete worktree and branch (auto-detected from cwd)
lazyworktree delete

# Delete worktree only, keep branch
lazyworktree delete --no-branch

# Delete specific worktree
lazyworktree delete my-feature

Build docs developers (and LLMs) love