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