[{"data":1,"prerenderedAt":668},["ShallowReactive",2],{"navigation_en":3,"-docs-guides-clean-up-workspaces":153,"-docs-guides-clean-up-workspaces-surround":663},{"gettingStarted":4,"guides":41,"cli":87,"configuration":123},[5],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":7},"Getting Started",false,"\u002Fdocs\u002Fgetting-started","docs\u002Fgetting-started",[11,16,21,26,31,36],{"title":12,"path":13,"stem":14,"icon":15},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002Fgetting-started\u002F01.introduction","i-lucide-house",{"title":17,"path":18,"stem":19,"icon":20},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002Fgetting-started\u002F02.installation","i-lucide-download",{"title":22,"path":23,"stem":24,"icon":25},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002Fgetting-started\u002F03.quick-start","i-lucide-zap",{"title":27,"path":28,"stem":29,"icon":30},"How It Works","\u002Fdocs\u002Fgetting-started\u002Fhow-it-works","docs\u002Fgetting-started\u002F04.how-it-works","i-lucide-workflow",{"title":32,"path":33,"stem":34,"icon":35},"Refs","\u002Fdocs\u002Fgetting-started\u002Frefs","docs\u002Fgetting-started\u002F05.refs","i-lucide-git-branch",{"title":37,"path":38,"stem":39,"icon":40},"Workspaces & Worktrees","\u002Fdocs\u002Fgetting-started\u002Fworkspaces","docs\u002Fgetting-started\u002F06.workspaces","i-lucide-folder-tree",[42],{"title":43,"icon":7,"path":44,"stem":45,"children":46,"page":7},"Guides","\u002Fdocs\u002Fguides","docs\u002Fguides",[47,52,57,62,67,72,77,82],{"title":48,"path":49,"stem":50,"icon":51},"Review a Pull Request","\u002Fdocs\u002Fguides\u002Freview-a-pull-request","docs\u002Fguides\u002F01.review-a-pull-request","i-lucide-git-pull-request",{"title":53,"path":54,"stem":55,"icon":56},"Run Dev Servers in Parallel","\u002Fdocs\u002Fguides\u002Frun-dev-servers-in-parallel","docs\u002Fguides\u002F02.run-dev-servers-in-parallel","i-lucide-plug",{"title":58,"path":59,"stem":60,"icon":61},"Seed Local Files","\u002Fdocs\u002Fguides\u002Fseed-local-files","docs\u002Fguides\u002F03.seed-local-files","i-lucide-sprout",{"title":63,"path":64,"stem":65,"icon":66},"Refresh a Workspace","\u002Fdocs\u002Fguides\u002Frefresh-a-workspace","docs\u002Fguides\u002F04.refresh-a-workspace","i-lucide-refresh-cw",{"title":68,"path":69,"stem":70,"icon":71},"Clean Up Workspaces","\u002Fdocs\u002Fguides\u002Fclean-up-workspaces","docs\u002Fguides\u002F05.clean-up-workspaces","i-lucide-trash-2",{"title":73,"path":74,"stem":75,"icon":76},"Script with uxd","\u002Fdocs\u002Fguides\u002Fscript-with-uxd","docs\u002Fguides\u002F06.script-with-uxd","i-lucide-braces",{"title":78,"path":79,"stem":80,"icon":81},"Install Shell Completions","\u002Fdocs\u002Fguides\u002Fshell-completions","docs\u002Fguides\u002F07.shell-completions","i-lucide-keyboard",{"title":83,"path":84,"stem":85,"icon":86},"Troubleshooting","\u002Fdocs\u002Fguides\u002Ftroubleshooting","docs\u002Fguides\u002F08.troubleshooting","i-lucide-stethoscope",[88],{"title":89,"icon":7,"path":90,"stem":91,"children":92,"page":7},"CLI Reference","\u002Fdocs\u002Fcli","docs\u002Fcli",[93,98,103,108,113,118],{"title":94,"path":95,"stem":96,"icon":97},"Command Grammar","\u002Fdocs\u002Fcli\u002Foverview","docs\u002Fcli\u002F01.overview","i-lucide-terminal",{"title":99,"path":100,"stem":101,"icon":102},"Workspace Verbs","\u002Fdocs\u002Fcli\u002Fworkspace-verbs","docs\u002Fcli\u002F02.workspace-verbs","i-lucide-folder-git-2",{"title":104,"path":105,"stem":106,"icon":107},"Project Verbs","\u002Fdocs\u002Fcli\u002Fproject-verbs","docs\u002Fcli\u002F03.project-verbs","i-lucide-boxes",{"title":109,"path":110,"stem":111,"icon":112},"Top-Level Verbs","\u002Fdocs\u002Fcli\u002Ftop-level-verbs","docs\u002Fcli\u002F04.top-level-verbs","i-lucide-wrench",{"title":114,"path":115,"stem":116,"icon":117},"Global Flags","\u002Fdocs\u002Fcli\u002Fglobal-flags","docs\u002Fcli\u002F05.global-flags","i-lucide-flag",{"title":119,"path":120,"stem":121,"icon":122},"Exit Codes","\u002Fdocs\u002Fcli\u002Fexit-codes","docs\u002Fcli\u002F06.exit-codes","i-lucide-circle-alert",[124],{"title":125,"icon":7,"path":126,"stem":127,"children":128,"page":7},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002Fconfiguration",[129,134,139,144,148],{"title":130,"path":131,"stem":132,"icon":133},"Overview","\u002Fdocs\u002Fconfiguration\u002Foverview","docs\u002Fconfiguration\u002F01.overview","i-lucide-settings",{"title":135,"path":136,"stem":137,"icon":138},"Project File","\u002Fdocs\u002Fconfiguration\u002Fproject-file","docs\u002Fconfiguration\u002F02.project-file","i-lucide-file-code",{"title":140,"path":141,"stem":142,"icon":143},"Commands & Hooks","\u002Fdocs\u002Fconfiguration\u002Fcommands-and-hooks","docs\u002Fconfiguration\u002F03.commands-and-hooks","i-lucide-play",{"title":145,"path":146,"stem":147,"icon":76},"Environment & Templates","\u002Fdocs\u002Fconfiguration\u002Fenvironment-and-templates","docs\u002Fconfiguration\u002F04.environment-and-templates",{"title":149,"path":150,"stem":151,"icon":152},"Editors","\u002Fdocs\u002Fconfiguration\u002Feditors","docs\u002Fconfiguration\u002F05.editors","i-lucide-app-window",{"id":154,"title":68,"body":155,"description":655,"extension":656,"links":657,"meta":658,"navigation":659,"path":69,"seo":660,"stem":70,"__hash__":662},"docs_guides\u002Fdocs\u002Fguides\u002F05.clean-up-workspaces.md",{"type":156,"value":157,"toc":647},"minimark",[158,167,172,215,218,236,240,324,366,374,394,398,402,407,423,431,434,440,443,461,468,472,481,492,496,517,523,526,544,550,560,580,584,623,626,643],[159,160,161,162,166],"p",{},"Workspaces accumulate. ",[163,164,165],"code",{},"clean"," removes them by name or by filter, always\nshowing its plan first.",[168,169,171],"h2",{"id":170},"remove-specific-workspaces","Remove specific workspaces",[173,174,179],"pre",{"className":175,"code":176,"language":177,"meta":178,"style":178},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","uxd my-project clean pr-42\nuxd my-project clean pr-42 feat-login\n","bash","",[163,180,181,200],{"__ignoreMap":178},[182,183,186,190,194,197],"span",{"class":184,"line":185},"line",1,[182,187,189],{"class":188},"szw1H","uxd",[182,191,193],{"class":192},"semJd"," my-project",[182,195,196],{"class":192}," clean",[182,198,199],{"class":192}," pr-42\n",[182,201,203,205,207,209,212],{"class":184,"line":202},2,[182,204,189],{"class":188},[182,206,193],{"class":192},[182,208,196],{"class":192},[182,210,211],{"class":192}," pr-42",[182,213,214],{"class":192}," feat-login\n",[159,216,217],{},"Or one workspace by ref, using the workspace verb:",[173,219,221],{"className":175,"code":220,"language":177,"meta":178,"style":178},"uxd my-project 42 rm\n",[163,222,223],{"__ignoreMap":178},[182,224,225,227,229,233],{"class":184,"line":185},[182,226,189],{"class":188},[182,228,193],{"class":192},[182,230,232],{"class":231},"ssYy9"," 42",[182,234,235],{"class":192}," rm\n",[168,237,239],{"id":238},"remove-by-filter","Remove by filter",[241,242,243,256],"table",{},[244,245,246],"thead",{},[247,248,249,253],"tr",{},[250,251,252],"th",{},"Filter",[250,254,255],{},"Removes",[257,258,259,270,280,294],"tbody",{},[247,260,261,267],{},[262,263,264],"td",{},[163,265,266],{},"--all",[262,268,269],{},"Every workspace for the project",[247,271,272,277],{},[262,273,274],{},[163,275,276],{},"--merged",[262,278,279],{},"Branches merged into the default branch (git-only check)",[247,281,282,287],{},[262,283,284],{},[163,285,286],{},"--closed",[262,288,289,290,293],{},"Workspaces whose PR is closed or merged (prefers ",[163,291,292],{},"gh",")",[247,295,296,301],{},[262,297,298],{},[163,299,300],{},"--older-than \u003Cdur>",[262,302,303,304,307,308,311,312,311,315,311,318,311,321,293],{},"Workspaces idle for at least ",[163,305,306],{},"\u003Cdur>"," (",[163,309,310],{},"s","\u002F",[163,313,314],{},"m",[163,316,317],{},"h",[163,319,320],{},"d",[163,322,323],{},"w",[173,325,327],{"className":175,"code":326,"language":177,"meta":178,"style":178},"uxd my-project clean --merged\nuxd my-project clean --closed\nuxd my-project clean --older-than 7d\n",[163,328,329,340,351],{"__ignoreMap":178},[182,330,331,333,335,337],{"class":184,"line":185},[182,332,189],{"class":188},[182,334,193],{"class":192},[182,336,196],{"class":192},[182,338,339],{"class":231}," --merged\n",[182,341,342,344,346,348],{"class":184,"line":202},[182,343,189],{"class":188},[182,345,193],{"class":192},[182,347,196],{"class":192},[182,349,350],{"class":231}," --closed\n",[182,352,354,356,358,360,363],{"class":184,"line":353},3,[182,355,189],{"class":188},[182,357,193],{"class":192},[182,359,196],{"class":192},[182,361,362],{"class":231}," --older-than",[182,364,365],{"class":192}," 7d\n",[159,367,368,369,373],{},"Filters ",[370,371,372],"strong",{},"intersect"," — this removes only workspaces that are both merged and\nidle for a week:",[173,375,377],{"className":175,"code":376,"language":177,"meta":178,"style":178},"uxd my-project clean --merged --older-than 7d\n",[163,378,379],{"__ignoreMap":178},[182,380,381,383,385,387,390,392],{"class":184,"line":185},[182,382,189],{"class":188},[182,384,193],{"class":192},[182,386,196],{"class":192},[182,388,389],{"class":231}," --merged",[182,391,362],{"class":231},[182,393,365],{"class":192},[395,396,397],"warning",{},"Explicit slugs and filters cannot be combined. Pick one or the other.",[168,399,401],{"id":400},"the-plan-and-the-prompt","The plan and the prompt",[159,403,404,406],{},[163,405,165],{}," prints what it is about to do and waits for confirmation:",[173,408,410],{"className":175,"code":409,"language":177,"meta":178,"style":178},"uxd my-project clean --all\n",[163,411,412],{"__ignoreMap":178},[182,413,414,416,418,420],{"class":184,"line":185},[182,415,189],{"class":188},[182,417,193],{"class":192},[182,419,196],{"class":192},[182,421,422],{"class":231}," --all\n",[173,424,429],{"className":425,"code":427,"language":428},[426],"language-text","→ plan:\n  feat-login (clean, 16 KB)\n","text",[163,430,427],{"__ignoreMap":178},[159,432,433],{},"Approve it and the removed slugs are listed with the space reclaimed:",[173,435,438],{"className":436,"code":437,"language":428},[426],"feat-login\n→ freed 16 KB\n",[163,439,437],{"__ignoreMap":178},[159,441,442],{},"For scripts and CI, skip the prompt:",[173,444,446],{"className":175,"code":445,"language":177,"meta":178,"style":178},"uxd my-project clean --merged --yes\n",[163,447,448],{"__ignoreMap":178},[182,449,450,452,454,456,458],{"class":184,"line":185},[182,451,189],{"class":188},[182,453,193],{"class":192},[182,455,196],{"class":192},[182,457,389],{"class":231},[182,459,460],{"class":231}," --yes\n",[159,462,463,464,467],{},"To see the plan and stop there, use ",[163,465,466],{},"--dry-run",".",[168,469,471],{"id":470},"safety-rules","Safety rules",[473,474,476,477,480],"note",{"title":475},"Dirty worktrees are skipped","A workspace with uncommitted changes is left alone. Pass ",[163,478,479],{},"--force"," to remove it\nanyway — that discards the changes.",[473,482,484,485,487,488,491],{"title":483},"Adopted workspaces are excluded","Working trees you adopted with a path ref are not removed by filters, because\n",[163,486,189],{}," did not create them. Pass ",[163,489,490],{},"--include-adopted"," to include them.",[168,493,495],{"id":494},"reconciling-drift","Reconciling drift",[159,497,498,499,501,502,505,506,508,509,512,513,516],{},"If a worktree was deleted outside ",[163,500,189],{}," — an ",[163,503,504],{},"rm -rf",", a disk cleanup — git\nmetadata and ",[163,507,189],{},"'s state entry are left pointing at nothing. ",[163,510,511],{},"list"," shows the\nworkspace as ",[163,514,515],{},"missing",":",[173,518,521],{"className":519,"code":520,"language":428},[426],"SLUG        KIND    BRANCH      STATUS   PORT  AGE  LAST USED\nfeat-login  branch  feat\u002Flogin  missing  3053  2m   1m\n",[163,522,520],{"__ignoreMap":178},[159,524,525],{},"Reconcile it with:",[173,527,529],{"className":175,"code":528,"language":177,"meta":178,"style":178},"uxd my-project clean --prune-state --yes\n",[163,530,531],{"__ignoreMap":178},[182,532,533,535,537,539,542],{"class":184,"line":185},[182,534,189],{"class":188},[182,536,193],{"class":192},[182,538,196],{"class":192},[182,540,541],{"class":231}," --prune-state",[182,543,460],{"class":231},[173,545,548],{"className":546,"code":547,"language":428},[426],"→ plan:\n  feat-login (missing, state-only, clean, ?)\nfeat-login\n→ freed 1 KB\n",[163,549,547],{"__ignoreMap":178},[159,551,552,553,555,556,559],{},"This drops state entries whose worktree is gone. ",[163,554,165],{}," also runs\n",[163,557,558],{},"git worktree prune"," as part of its normal work, so the git side is handled.",[473,561,562,565,566,568,569,572,573,576,577,467],{},[163,563,564],{},"--prune-state"," obeys the same confirmation prompt as any other ",[163,567,165],{}," run.\nWithout ",[163,570,571],{},"--yes"," on a non-interactive terminal it exits ",[163,574,575],{},"2"," with\n",[163,578,579],{},"error(E_USAGE): refusing to remove 1 workspace(s) without confirmation",[168,581,583],{"id":582},"a-cleanup-habit","A cleanup habit",[173,585,587],{"className":175,"code":586,"language":177,"meta":178,"style":178},"# Friday: everything that shipped, plus anything you have not touched in a fortnight\nuxd my-project clean --closed --yes\nuxd my-project clean --older-than 14d --yes\n",[163,588,589,595,608],{"__ignoreMap":178},[182,590,591],{"class":184,"line":185},[182,592,594],{"class":593},"sq92B","# Friday: everything that shipped, plus anything you have not touched in a fortnight\n",[182,596,597,599,601,603,606],{"class":184,"line":202},[182,598,189],{"class":188},[182,600,193],{"class":192},[182,602,196],{"class":192},[182,604,605],{"class":231}," --closed",[182,607,460],{"class":231},[182,609,610,612,614,616,618,621],{"class":184,"line":353},[182,611,189],{"class":188},[182,613,193],{"class":192},[182,615,196],{"class":192},[182,617,362],{"class":231},[182,619,620],{"class":192}," 14d",[182,622,460],{"class":231},[159,624,625],{},"Check what you would reclaim first:",[173,627,629],{"className":175,"code":628,"language":177,"meta":178,"style":178},"uxd my-project list --du\n",[163,630,631],{"__ignoreMap":178},[182,632,633,635,637,640],{"class":184,"line":185},[182,634,189],{"class":188},[182,636,193],{"class":192},[182,638,639],{"class":192}," list",[182,641,642],{"class":231}," --du\n",[644,645,646],"style",{},"html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sq92B, html code.shiki .sq92B{--shiki-light:#66707B;--shiki-default:#66707B;--shiki-dark:#BDC4CC}",{"title":178,"searchDepth":202,"depth":202,"links":648},[649,650,651,652,653,654],{"id":170,"depth":202,"text":171},{"id":238,"depth":202,"text":239},{"id":400,"depth":202,"text":401},{"id":470,"depth":202,"text":471},{"id":494,"depth":202,"text":495},{"id":582,"depth":202,"text":583},"Remove workspaces by name or by filter, and reconcile state when something was deleted behind uxd's back.","md",null,{},{"icon":71},{"title":68,"description":661},"Use uxd clean to remove workspaces by slug or filter — merged, closed, older than — plus safety rules, dry runs, and state pruning.","pqXyQCOJ2utIZ1pmjT83SDAuNMrtYMxJcmvunbNDvAY",[664,666],{"title":63,"path":64,"stem":65,"description":665,"icon":66,"children":-1},"Bring a workspace up to date with its ref, and decide what happens to local changes.",{"title":73,"path":74,"stem":75,"description":667,"icon":76,"children":-1},"Use uxd from shell scripts and CI — the stdout\u002Fstderr contract, --json output shapes, and exit codes you can branch on.",1784975262170]