[{"data":1,"prerenderedAt":400,"buildId":401},["ShallowReactive",2],{"docs:\u002Fguide\u002Finstallation":3},{"page":4,"section":16,"document":17,"credits":10,"prev":392,"next":396},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"installation","\u002Fguide\u002Finstallation","guide\u002Finstallation.md","Installation","Run whatfrees once with npx, install it as a command, or add it to a Node program as a library.",null,[],"i-lucide-download","article",true,2,"guide",{"nodes":18,"toc":380},[19,23,31,54,60,78,84,176,205,211,342,351,357],[20,21,22],"p",{},"Requires Node.js 22.20 or later on Linux or macOS. whatfrees refuses to run on Windows.",[24,25,30],"h2",{"id":26,"anchor":27},"run-it-once",{"label":28,"icon":29},"Section titled \"Run it once\"","#","Run it once",[32,33,37],"pre",{"language":34,"frame":35,"class":36,"wrap":14},"sh","terminal","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[38,39,41],"code",{"class":40},"language-sh",[42,43,46,50],"span",{"class":44,"style":45},"line","display: inline",[42,47,49],{"style":48},"color:#953800;--shiki-dark:#FFA657","npx",[42,51,53],{"style":52},"color:#0A3069;--shiki-dark:#A5D6FF"," whatfrees",[24,55,59],{"id":56,"anchor":57},"install-the-command",{"label":58,"icon":29},"Section titled \"Install the command\"","Install the command",[32,61,62],{"language":34,"frame":35,"class":36,"wrap":14},[38,63,64],{"class":40},[42,65,66,69,72,76],{"class":44,"style":45},[42,67,68],{"style":48},"npm",[42,70,71],{"style":52}," install",[42,73,75],{"style":74},"color:#0550AE;--shiki-dark:#79C0FF"," --global",[42,77,53],{"style":52},[24,79,83],{"id":80,"anchor":81},"use-it-as-a-library",{"label":82,"icon":29},"Section titled \"Use it as a library\"","Use it as a library",[85,86,111,129,145,161],"tabs",{"uid":87,"count":88,"labels":89,"sync":93,"code":94,"magic":95,"icons":96},"ct-g3qwfb-1","4",[90,68,91,92],"pnpm","yarn","bun","pm","true","auto",[97,102,105,108],{"name":98,"src":99,"ratio":100,"mask":101},"pm:pnpm","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23f9ad00' d='M30 10.75h-8.749V2H30Zm-9.626 0h-8.75V2h8.75Zm-9.625 0H2V2h8.749ZM30 20.375h-8.749v-8.75H30Z'\u002F%3E%3Cpath fill='%238a8a8a' d='M20.374 20.375h-8.75v-8.75h8.75Zm0 9.625h-8.75v-8.75h8.75ZM30 30h-8.749v-8.75H30Zm-19.251 0H2v-8.75h8.749Z'\u002F%3E%3C\u002Fsvg%3E",1,false,{"name":103,"src":104,"ratio":100,"mask":101},"pm:npm","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c12127' d='M2 2h28v28H2'\u002F%3E%3Cpath fill='%238a8a8a' d='M7.25 7.25h17.5v17.5h-3.5v-14H16v14H7.25'\u002F%3E%3C\u002Fsvg%3E",{"name":106,"src":107,"ratio":100,"mask":101},"pm:yarn","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%232188b6' d='M28.208 24.409a10.5 10.5 0 0 0-3.959 1.822a23.7 23.7 0 0 1-5.835 2.642a1.63 1.63 0 0 1-.983.55a62 62 0 0 1-6.447.577c-1.163.009-1.876-.3-2.074-.776a1.573 1.573 0 0 1 .866-2.074a4 4 0 0 1-.514-.379c-.171-.171-.352-.514-.406-.388c-.225.55-.343 1.894-.947 2.5c-.83.839-2.4.559-3.328.072c-1.019-.541.072-1.813.072-1.813a.73.73 0 0 1-.992-.343a4.85 4.85 0 0 1-.667-2.949a5.37 5.37 0 0 1 1.749-2.895a9.3 9.3 0 0 1 .658-4.4a10.45 10.45 0 0 1 3.165-3.661S6.628 10.747 7.35 8.817c.469-1.262.658-1.253.812-1.308a3.6 3.6 0 0 0 1.452-.857a5.27 5.27 0 0 1 4.41-1.7S15.2 1.4 16.277 2.09a18.4 18.4 0 0 1 1.533 2.886s1.281-.748 1.425-.469a11.33 11.33 0 0 1 .523 6.132a14 14 0 0 1-2.6 5.411c-.135.225 1.551.938 2.615 3.887c.983 2.7.108 4.96.262 5.212c.027.045.036.063.036.063s1.127.09 3.391-1.308a8.5 8.5 0 0 1 4.277-1.604a1.081 1.081 0 0 1 .469 2.11Z'\u002F%3E%3C\u002Fsvg%3E",{"name":109,"src":110,"ratio":100,"mask":101},"pm:bun","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fbf0df' d='M29 17c0 5.65-5.82 10.23-13 10.23S3 22.61 3 17c0-3.5 2.24-6.6 5.66-8.44S14.21 4.81 16 4.81s3.32 1.54 7.34 3.71C26.76 10.36 29 13.46 29 17'\u002F%3E%3Cpath fill='none' stroke='%23000' d='M16 27.65c7.32 0 13.46-4.65 13.46-10.65c0-3.72-2.37-7-5.89-8.85c-1.39-.75-2.46-1.41-3.37-2l-1.13-.69A6.14 6.14 0 0 0 16 4.35a6.9 6.9 0 0 0-3.3 1.23c-.42.24-.86.51-1.32.8c-.87.54-1.83 1.13-3 1.73C4.91 10 2.54 13.24 2.54 17c0 6 6.14 10.65 13.46 10.65Z'\u002F%3E%3Cellipse cx='21.65' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'\u002F%3E%3Cellipse cx='10.41' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'\u002F%3E%3Cpath fill-rule='evenodd' d='M11.43 18.11a2 2 0 1 0-2-2.05a2.05 2.05 0 0 0 2 2.05m9.2 0a2 2 0 1 0-2-2.05a2 2 0 0 0 2 2.05'\u002F%3E%3Cpath fill='%238a8a8a' fill-rule='evenodd' d='M10.79 16.19a.77.77 0 1 0-.76-.77a.76.76 0 0 0 .76.77m9.2 0a.77.77 0 1 0 0-1.53a.77.77 0 0 0 0 1.53'\u002F%3E%3Cpath fill='%23b71422' stroke='%23000' stroke-width='.75' d='M18.62 19.67a3.3 3.3 0 0 1-1.09 1.75a2.48 2.48 0 0 1-1.5.69a2.53 2.53 0 0 1-1.5-.69a3.28 3.28 0 0 1-1.08-1.75a.26.26 0 0 1 .29-.3h4.58a.27.27 0 0 1 .3.3Z'\u002F%3E%3Cpath fill='%23ccbea7' fill-rule='evenodd' d='M14.93 5.75a6.1 6.1 0 0 1-2.09 4.62c-.1.09 0 .27.11.22c1.25-.49 2.94-1.94 2.23-4.88c-.03-.15-.25-.11-.25.04m.85 0a6 6 0 0 1 .57 5c0 .13.12.24.21.13c.83-1 1.54-3.11-.59-5.31c-.1-.11-.27.04-.19.17Zm1-.06a6.1 6.1 0 0 1 2.53 4.38c0 .14.21.17.24 0c.34-1.3.15-3.51-2.66-4.66c-.12-.02-.21.18-.09.27ZM9.94 9.55a6.27 6.27 0 0 0 3.89-3.33c.07-.13.28-.08.25.07c-.64 3-2.79 3.59-4.13 3.51c-.14-.01-.14-.21-.01-.25'\u002F%3E%3C\u002Fsvg%3E",[112,113,116],"tabs-item",{"label":90,"index":114,"icon":115},"1",{"name":98,"src":99,"ratio":100,"mask":101},[32,117,118],{"language":34,"frame":35,"class":36,"wrap":14},[38,119,120],{"class":40},[42,121,122,124,127],{"class":44,"style":45},[42,123,90],{"style":48},[42,125,126],{"style":52}," add",[42,128,53],{"style":52},[112,130,133],{"label":68,"index":131,"icon":132},"2",{"name":103,"src":104,"ratio":100,"mask":101},[32,134,135],{"language":34,"frame":35,"class":36,"wrap":14},[38,136,137],{"class":40},[42,138,139,141,143],{"class":44,"style":45},[42,140,68],{"style":48},[42,142,71],{"style":52},[42,144,53],{"style":52},[112,146,149],{"label":91,"index":147,"icon":148},"3",{"name":106,"src":107,"ratio":100,"mask":101},[32,150,151],{"language":34,"frame":35,"class":36,"wrap":14},[38,152,153],{"class":40},[42,154,155,157,159],{"class":44,"style":45},[42,156,91],{"style":48},[42,158,126],{"style":52},[42,160,53],{"style":52},[112,162,164],{"label":92,"index":88,"icon":163},{"name":109,"src":110,"ratio":100,"mask":101},[32,165,166],{"language":34,"frame":35,"class":36,"wrap":14},[38,167,168],{"class":40},[42,169,170,172,174],{"class":44,"style":45},[42,171,92],{"style":48},[42,173,126],{"style":52},[42,175,53],{"style":52},[20,177,178,179,184,185,188,189,188,192,195,196,199,200,204],{},"The library has one runtime dependency, ",[180,181,183],"a",{"href":182},"https:\u002F\u002Freaderly.loadsheet.dev","readerly",", which shapes the command line's output for the reader. Its entries are ",[38,186,187],{},"whatfrees",", ",[38,190,191],{},"whatfrees\u002Fmeasure",[38,193,194],{},"whatfrees\u002Fsources"," and ",[38,197,198],{},"whatfrees\u002Fschema",". See the ",[180,201,203],{"href":202},"\u002Freference\u002Fapi","JavaScript API",".",[24,206,210],{"id":207,"anchor":208},"first-run",{"label":209,"icon":29},"Section titled \"First run\"","First run",[212,213,214,235,274,302],"steps",{},[215,216,217,224,232],"step",{"index":114},[218,219,223],"h3",{"id":220,"anchor":221},"scan",{"label":222,"icon":29},"Section titled \"Scan\"","Scan",[32,225,226],{"language":34,"frame":35,"class":36,"wrap":14},[38,227,228],{"class":40},[42,229,230],{"class":44,"style":45},[42,231,187],{"style":48},[20,233,234],{},"It prints the totals, then one line per entry, biggest first. Each line holds the size, the verdict, what it is, why, and the command. Entries that free less than 50 MB, and entries in use, are hidden. The totals still count the small ones.",[215,236,237,243,260],{"index":131},[218,238,242],{"id":239,"anchor":240},"show-everything",{"label":241,"icon":29},"Section titled \"Show everything\"","Show everything",[32,244,245],{"language":34,"frame":35,"class":36,"wrap":14},[38,246,247],{"class":40},[42,248,249,251,254,257],{"class":44,"style":45},[42,250,187],{"style":48},[42,252,253],{"style":74}," --all",[42,255,256],{"style":74}," --min",[42,258,259],{"style":74}," 0",[20,261,262,265,266,269,270,273],{},[38,263,264],{},"--all"," adds the entries that are in use or under ",[38,267,268],{},"--min",". ",[38,271,272],{},"--min 0"," shows the small ones too.",[215,275,276,282,296],{"index":147},[218,277,281],{"id":278,"anchor":279},"look-in-another-folder",{"label":280,"icon":29},"Section titled \"Look in another folder\"","Look in another folder",[32,283,284],{"language":34,"frame":35,"class":36,"wrap":14},[38,285,286],{"class":40},[42,287,288,290,293],{"class":44,"style":45},[42,289,187],{"style":48},[42,291,292],{"style":74}," --root",[42,294,295],{"style":52}," ~\u002Fscratch",[20,297,298,301],{},[38,299,300],{},"--root"," adds a folder to the worktrees source. Everything in it is a candidate: a git checkout gets the git checks, anything else is a leftover. Repeat the flag for more folders.",[215,303,304,310,327],{"index":88},[218,305,309],{"id":306,"anchor":307},"re-check-before-you-delete",{"label":308,"icon":29},"Section titled \"Re-check before you delete\"","Re-check before you delete",[32,311,312],{"language":34,"frame":35,"class":36,"wrap":14},[38,313,314],{"class":40},[42,315,316,318,321,324],{"class":44,"style":45},[42,317,187],{"style":48},[42,319,320],{"style":52}," check",[42,322,323],{"style":74}," --json",[42,325,326],{"style":52}," ~\u002F.codex\u002Fworktrees\u002F9f2c\u002Fapp",[20,328,329,330,333,334,337,338,204],{},"It exits with 0 when the path is ",[38,331,332],{},"safe"," or ",[38,335,336],{},"orphan",". Check the verdict too: an orphan can still contain unique files. See ",[180,339,341],{"href":340},"\u002Fguide\u002Fcheck","whatfrees check",[20,343,344,345,347,348,350],{},"whatfrees prints the command and stops there. An agent should run it automatically only for a ",[38,346,332],{}," entry after a recheck both succeeds and still reports ",[38,349,332],{},". Leave orphans for manual review.",[24,352,356],{"id":353,"anchor":354},"where-the-size-cache-goes",{"label":355,"icon":29},"Section titled \"Where the size cache goes\"","Where the size cache goes",[20,358,359,360,363,364,367,368,371,372,375,376,379],{},"whatfrees keeps the sizes of single files in ",[38,361,362],{},"measure.json",", keyed by path and modification time. The folder is ",[38,365,366],{},"$XDG_CACHE_HOME\u002Fwhatfrees"," when that is set. Otherwise it is ",[38,369,370],{},"~\u002FLibrary\u002FCaches\u002Fwhatfrees"," on macOS and ",[38,373,374],{},"~\u002F.cache\u002Fwhatfrees"," elsewhere. ",[38,377,378],{},"--no-cache"," neither reads nor writes it.",[381,382,383,384,391],{"id":26,"depth":15,"text":30},{"id":56,"depth":15,"text":59},{"id":80,"depth":15,"text":83},{"id":207,"depth":15,"text":210,"children":385},[386,388,389,390],{"id":220,"depth":387,"text":223},3,{"id":239,"depth":387,"text":242},{"id":278,"depth":387,"text":281},{"id":306,"depth":387,"text":309},{"id":353,"depth":15,"text":356},{"path":393,"title":394,"description":395},"\u002Fguide","Introduction","whatfrees tells a coding agent what deleting each thing on the disk really frees, whether it's safe, and the command to run.",{"path":397,"title":398,"description":399},"\u002Fguide\u002Fspeed","How it stays fast","whatfrees asks the owner of each thing first, walks only what no one sized, stops at a deadline, and counts a hard-linked file once.",1796464608329,"84b4d453-0d43-4339-8103-d1d78e551efe"]