GitHub 0
Skip to content

Introduction to whatfrees

whatfrees tells a coding agent what deleting each thing on the disk really frees, whether it's safe, and the command to run.

An agent that has to free disk space has a bad choice. It can run du, guess which folders are safe, and delete. Or it can ask a person. whatfrees gives it the facts instead.

For each thing that holds space, whatfrees reports:

  • What deleting it frees. Not what du prints. A file that has a hard link outside the folder stays on disk, so it doesn't count.
  • A verdict. safe, orphan, ask, unsaved, live or unchecked, with the evidence behind it. See Verdicts.
  • The command. A POSIX shell command, quoted, built from a short list of known verbs.

It runs on Linux and macOS. It reads and prints. It never deletes, moves or changes your files. The one file it writes is its own size cache.

whatfrees --min 10MB

A source is a place that holds space. The built-in sources look for agent worktrees and pnpm stores, using Git metadata or pnpm settings when available. See Sources for details, or run whatfrees sources to list the sources your installed version supports.

PageWhat it answers
InstallationHow to install it and run it the first time
How it stays fastOwners first, a walker with a deadline, hard links counted once
VerdictsWhat each verdict means and which facts decide it
SourcesEvery place whatfrees looks
whatfrees checkThe re-check to run right before a delete
For agentsThe loop an agent follows
Command lineEvery flag and exit code
JSON reportwhatfrees/report@1, field by field
JavaScript APIscan, check, measure and defineSource