whatfrees [options] report what can go, biggest first
whatfrees sources list the sources
whatfrees check <path> re-check one path right before deleting itOptions
Section titled "Options"| Flag | Default | Meaning |
|---|---|---|
--only <ids> | all sources | Run only these sources, comma-separated. Repeatable. An unknown id is a usage error |
--root <dir> | none | Also look in this folder. Repeatable. See Sources |
--budget <s> | 5 | Seconds for the whole scan. 0 asks owners and walks nothing |
--min <size> | 50MB | Hide entries that free less. Takes 200MB, 1.5G, 200 MiB or plain bytes, in powers of 1024 |
--exact | off | Walk every tree to the end, whatever the budget. Skips the size cache |
--all | off | Also show entries that are in use or under --min |
--no-cache | off | Don't read or write the size cache |
--json | off | Print the whatfrees/report@1 document |
--help, -h | Print the usage | |
--version | Print the version. It answers before anything else loads |
readerly shapes the output and reads its own flags too, such as --format, --full, --max-chars and --color.
Output
Section titled "Output"The first line says how the run went and how long it took. The second gives the totals and the free space.
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.Then one line per entry: the size, the verdict, what it is, why, and the command. A Partial: line appears when sizes are lower bounds or missing, and a skipped: line for each source with no answer. Last come the next: lines.
Exit codes
Section titled "Exit codes"| Code | Meaning |
|---|---|
| 0 | The run finished. For check, the path is safe or orphan |
| 1 | The run failed. For check, the path is anything else, or doesn't exist |
| 2 | Usage error: an unknown flag, a bad --min or --budget, an unknown source id, or a wrong number of arguments |
A finished scan exits with 0 even when it found nothing, or when it is partial. Read partial and skipped for that.
For check, exit code 0 alone does not clear a path for automatic deletion. An orphan still needs manual review. See whatfrees check.
Environment
Section titled "Environment"| Variable | Effect |
|---|---|
XDG_CACHE_HOME | Where the size cache goes. See Installation |
CODEX_HOME | Where whatfrees looks for Codex's worktrees folder |
CLAUDE_CONFIG_DIR | Where whatfrees reads .claude.json to find Claude Code's projects |
whatfrees runs on Linux and macOS. On any other platform it stops with an error.