GitHub 0
Skip to content

JSON report

The whatfrees/report@1 document that whatfrees --json prints, field by field.

whatfrees --json prints one JSON document. Its schema is whatfrees/report@1. The number changes only when a field changes meaning or goes away. New optional fields can appear without a new number, so ignore fields you don't know.

The types are in whatfrees/schema. See the JavaScript API.

This report has two entries, cut to fit.

{
  "schema": "whatfrees/report@1",
  "disk": [
    {
      "path": "/",
      "free": 190215979008,
      "total": 983040749568
    }
  ],
  "totals": {
    "safe": 21016576,
    "orphan": 30019584,
    "ask": 5005312
  },
  "skipped": [],
  "partial": false,
  "budget": {
    "ms": 5000,
    "spent": 122
  },
  "next": [
    {
      "command": "whatfrees --all",
      "reason": "2 entries hidden: in use or under the minimum"
    }
  ],
  "entries": [
    {
      "id": "worktrees:/home/you/.codex/worktrees/bb03/app",
      "source": "worktrees",
      "what": "Codex worktree of a repository that is gone",
      "path": "/home/you/.codex/worktrees/bb03/app",
      "bytes": {
        "frees": 30019584,
        "apparent": 30019584,
        "shared": 0,
        "precision": "exact"
      },
      "verdict": "orphan",
      "evidence": [
        "Its repository no longer knows it: /home/you/app/.git/worktrees/app3 is gone, so git can't tell what it holds."
      ],
      "command": "rm -rf -- /home/you/.codex/worktrees/bb03/app",
      "lastUsed": "2026-11-26T05:57:39.494Z"
    },
    {
      "id": "worktrees:/home/you/.codex/worktrees/9f2c/app",
      "source": "worktrees",
      "what": "Codex worktree of app on fix-queue",
      "path": "/home/you/.codex/worktrees/9f2c/app",
      "bytes": {
        "frees": 21016576,
        "apparent": 21016576,
        "shared": 0,
        "precision": "exact"
      },
      "verdict": "safe",
      "evidence": [
        "Clean, pushed and untouched for 9 days."
      ],
      "command": "git -C /home/you/app worktree remove /home/you/.codex/worktrees/9f2c/app",
      "lastUsed": "2026-11-26T05:57:39.494Z"
    }
  ]
}
json
FieldTypeMeaning
schema"whatfrees/report@1"The document's version
diskDisk[]One item per file system among /, your home folder and each --root
totals{ safe, orphan, ask }Bytes the safe, orphan and ask entries free. Counted before --min hides any entry
skippedSkipped[]Sources that have nothing in the report, and why
partialbooleantrue when a source or a walk didn't finish, so some bytes are lower bounds or missing
budget{ ms, spent }The budget in milliseconds, null with --exact, and the time spent
nextNext[]Commands worth running next
entriesEntry[]The things that can go, biggest bytes.frees first
FieldMeaning
pathA path on the file system
freeBytes an unprivileged process may still write
totalBytes the file system holds
FieldMeaning
sourceThe source id
reasonbudget when the time ran out before it answered, error when it failed, remote when its data is on another machine
messageWhy it failed or was skipped. Only with error and remote
FieldMeaning
commandA command to run, such as whatfrees --budget 10
reasonWhy it helps
FieldTypeMeaning
idstring<source>:<path or name>. Stable across runs
sourcestringThe id of the source that found it
whatstringWhat it is, in a few words
pathstringThe absolute path. Left out when the thing has none, as a Docker image
bytesBytesWhat deleting it frees. See below
verdictstringOne of the six verdicts
evidencestringThe facts behind the verdict, one short sentence each
commandstringA POSIX shell command, its arguments quoted. whatfrees never runs it
thenstringA command to run after command for the bytes to come back. Optional
lastUsedstring or nullAn ISO 8601 time, or null when unknown
cachedtrueThe size came from the size cache. Optional

The text report hides entries that are live, and entries that free less than --min. The JSON report applies the same filter. Pass --all for both.

FieldMeaning
freesWhat deleting it frees: blocks that no hard link outside it keeps
apparentWhat it takes on disk, as du counts it. Always frees + shared
sharedHard-linked bytes that stay because a link outside it keeps them
precisionHow far to trust the numbers
ValueMeaning
exactThe whole tree was read
lower-boundThe budget or an unreadable folder cut the walk short. The real number is at least this
upper-boundPart of it may be shared and wasn't checked. The real number is at most this
ownerThe tool that owns it reported the size, such as Docker or Ollama
unmeasuredNothing was read in time. All three numbers are 0

The text report prints a lower bound as ≥4.2 GB, an upper bound as ≤4.2 GB, and an unmeasured entry as unmeasured.

Two more commands print JSON of their own.

CommandschemaShape
whatfrees check <path> --jsonwhatfrees/check@1See whatfrees check
whatfrees sources --jsonwhatfrees/sources@1{ schema, sources: [{ id, platforms, description }] }

A failure prints { schema, status, error } in place of the document, with the exit code of the failure.