The command reads the scan Diskling saved, or runs its own when you ask for one. It comes inside Diskling, so it’s always the same version as the app.
Install it
- Open Automation in the sidebar and scroll to Command line.
- Click Install. macOS asks for your Mac’s password, since
/usr/local/binbelongs to the system. - Open a new Terminal window and run
diskling --versionto check.
Install puts a link at /usr/local/bin/diskling that points into Diskling. If you’d rather run it yourself, the same section shows the line to paste in Terminal instead. Remove takes the link away again.
Commands
diskling space Free space, as Finder counts it
diskling scan [path] Where the space went (the startup disk, or a folder)
diskling why <path> What a folder is, who owns it, and whether it can go
diskling clean --safe [--dry-run] Clear the Safe items from Diskling's last scan
diskling rules [run] The Automation rules, or run them now
diskling --version
Run diskling help to see the list again.
Free space
diskling space
49.08 GB free of 494.38 GB (9.77 GB of it is space macOS can clear)
Why a folder is there
why answers the question Diskling answers in the side panel: what a folder is, who it belongs to, and what happens if it goes. It uses Diskling’s last scan for the size.
diskling why ~/Library/Caches
~/Library/Caches
Size: 14.07 GB (Diskling's scan, 1 hour ago)
Owner: App caches (rebuilds)
What it is: Caches apps keep so they start and load faster. Apple tells developers their apps can't count on these files staying.
If removed: Apps make them again when they need them. The first launch afterwards can be slower, and an app that's open while its cache goes can misbehave, so quit it first.
Diskling won't remove it: Its contents can go, but not the folder itself.
The last line always says whether Diskling would remove that path, and if not, why.
Scan
diskling scan scans the startup disk and lists where the space went, by owner. diskling scan ~/Projects does the same for one folder and lists the 10 biggest things in it. Both run a fresh scan, so they take as long as a scan does in the app.
Safe cleanup
Try a dry run first. It lists what would go, from Diskling’s last scan, and removes nothing:
diskling clean --safe --dry-run
Would remove 360 KB (from Diskling's scan 1 hour ago):
12 KB CrashReporter
295 KB DiagnosticReports
Without --dry-run, it clears those items and says how much came back. The run shows up in History, the same as a cleanup in the app. Only Safe items run from here. Anything that needs a look goes through Clean.
Rules
diskling rules lists your Automation rules, whether each one is on, and when it last ran. diskling rules run runs them now, from Diskling’s last scan. Scheduled scans and cleanup rules explains how rules work.
JSON for scripts
Add --json to any command for JSON output. Sizes are in bytes and dates are in ISO 8601, so scripts don’t need to parse text:
diskling space --json
{
"available" : 49077654663,
"date" : "2026-10-13T05:05:43Z",
"free" : 39304556544,
"purgeable" : 9773098119,
"total" : 494384795648
}
Errors go to standard error with a non-zero exit code. With --json, the error is JSON too.
Free and Pro
The command line is part of Pro. On Free, every command except help and --version stops with a note to open Diskling, Settings, License. See your license for how the trial works.