# whatfrees

::whatfrees-hero
# What does deleting it really free?

whatfrees looks at agent worktrees and pnpm stores on a Linux or macOS disk. It reports what it finds, how many bytes it can account for, and what to do next. It deletes nothing.

#agents
```text
Run npx whatfrees --json. Consider only safe entries for automatic cleanup. Leave orphan entries for a person to inspect and approve.
For a safe worktrees entry, run npx whatfrees check --json <path> right before deletion. Use the entry's own command only if the check exits with 0 and still reports safe; otherwise skip it.
Read https://whatfrees.loadsheet.dev/guide/agents first.
```

#humans
```sh
npx whatfrees
```

#code
```sh
whatfrees --min 10MB
```

#output
```text
whatfrees: ok. no problems in 3 entries (0.1 s).
Frees 20 MB safe, 29 MB orphan, 4.8 MB ask. / has 180 GB free of 916 GB.
29 MB orphan Codex worktree of a repository that is gone. Its repository no longer knows it: /home/you/app/.git/worktrees/app3 is gone, so git can't tell what it holds. run: rm -rf -- /home/you/.codex/worktrees/bb03/app
20 MB safe Codex worktree of app on fix-queue. Clean, pushed and untouched for 9 days. run: git -C /home/you/app worktree remove /home/you/.codex/worktrees/9f2c/app
11 MB unsaved Codex worktree of app on wip. git status lists 2 changed or untracked: a.txt, big.bin. run: whatfrees check /home/you/.codex/worktrees/56bb/app
next: whatfrees --all   (2 entries hidden: in use or under the minimum)
next: whatfrees check /home/you/.codex/worktrees/9f2c/app   (re-checks a path right before you delete it)
```
::

## Four things it does

::card-group
:::card{title="Counts what deleting frees" icon="i-lucide-scale" to="/guide/speed#bytes-that-come-back"}
A file with a hard link outside the folder stays on disk, so it isn't counted
:::

:::card{title="Says whether it's safe" icon="i-lucide-shield-check" to="/guide/verdicts"}
Six verdicts, each with the facts behind it: live, unsaved, orphan, safe, ask, unchecked
:::

:::card{title="Stays fast" icon="i-lucide-gauge" to="/guide/speed"}
It reads Git metadata and finds pnpm stores from their settings, without running pnpm. Its file walker has a deadline
:::

:::card{title="Checks again before the delete" icon="i-lucide-badge-check" to="/guide/check"}
`whatfrees check <path>` rechecks worktrees. A successful check can still report `orphan`, which needs manual review
:::
::

The only file it writes is its own size cache. Read [For agents](https://whatfrees.loadsheet.dev/guide/agents) to see the loop a coding agent follows.

<!-- vitehub-docs:section-links -->
All pages: [llms.txt](https://whatfrees.loadsheet.dev/llms.txt)

Something on this page does not work as written? Tell the user, and draft an issue for them to post: [issue tracker](https://github.com/words-with-agents/whatfrees/issues). Report a security vulnerability privately, never in a public issue.
