workler remove
Delete a workspace.
bash
workler remove <name> [--force]Behavior
Recursively deletes .worktrees/<name> — after checking that nothing would be lost:
- Refuses if the workspace has any local changes — uncommitted changes to tracked files and untracked files. Deletion is forever, so this guard is deliberately stricter than the tracked-only dirty check used by
statusandsync; even files created by copy rules (like a copied.env) count. maincan never be removed.
Removal is plain directory deletion: any nested workspaces under the workspace's own .worktrees/ go with it, and local branches that exist only in that clone are lost — run workler branch-sync first if you want them mirrored into the root as refs/workler/<name>/....
Options
| Flag | Description |
|---|---|
--force | Remove even with local changes |
Output
text
removed feature-aErrors
- No workspace named
<name>. - Workspace has local changes (without
--force):workspace has local changes: <path>. <name>ismain.
Examples
bash
workler remove feature-a
workler remove broken-experiment --force
workler branch-sync && workler remove feature-a # keep its branches as refs first