Skip to content

Repository files navigation

Silt

Disk space analysis for macOS, and an honest account of what is safe to delete.

Silt is the sediment that settles at the bottom without anyone putting it there — caches, build products, device symbols, downloads from three years ago. This finds it.

Requires macOS 14 or later. Apple Silicon and Intel. Not sandboxed, distributed outside the App Store. Apache 2.0.

What it does

  • A map of the disk. A squarified treemap of any folder, click to descend, sizes measured the way the disk measures them.
  • Cleaners with consequences attached. Every rule says what it removes, what comes back on its own, and what does not. Nothing irreplaceable is ever preselected.
  • Largest and forgotten files. Everything over a megabyte, sorted by size or by how long it has gone unopened.
  • Duplicates by content. Size, then a head-and-tail signature, then a full hash — so files that merely happen to be the same size are not reported as copies.
  • An explanation of the gap. Where a scan total falls short of the space the volume says is in use, Silt shows the difference and names its causes rather than quietly hiding it.

Building

swift build && swift test      # the engine and its tests
Scripts/build-app.sh           # assembles Silt.app
open .build/arm64-apple-macosx/debug/Silt.app

swift run silt scan ~          # the same engine, no window

There is no .xcodeproj and there should not be one — plain SwiftPM keeps the project usable from any editor and avoids a file format that conflicts on every merge.

The command line tool

silt drives the whole engine without an interface, which is how an engine problem stays distinguishable from an interface one. It never deletes anything.

silt scan /           --depth 2     # tree of what is using space
silt largest ~        --count 40    # biggest files, with paths
silt forgotten ~      --days 730    # large files nobody has opened in two years
silt duplicates ~/Documents         # identical contents, not identical names
silt cleaners         --verbose     # what could be cleaned, and what it would cost

Numbers you should expect to argue with

Disk sizes disagree with each other constantly, and most of the disagreements are real rather than bugs. Silt takes a position on each:

Allocated, not logical. Every figure is the space a file occupies, not the length it reports. A 100-byte file occupies 4 KB; a compressed system binary reports 2.4 MB and occupies 905 KB. Only the allocated figure answers "what do I get back if I delete this".

Hard links counted once. A file with four names is one file. Counting it per name is what makes /Applications look enormous in tools that do not check. On a full scan here that is 2.8 GB of difference.

Mount points not followed. A scan of your startup disk does not report an external drive, a disk image or a mounted simulator runtime as part of it.

Base 1000. 1 GB is 1,000,000,000 bytes, matching Finder and About This Mac. Disagreeing with the rest of the system about the size of a gigabyte makes every figure look like a bug.

The scan total will be lower than the volume's used space, and that is not an error. Some of the gap is folders macOS will not let an unentitled app read; some is purgeable space; some is local Time Machine snapshots, whose blocks belong to files that no longer exist and which no directory walk can see. Silt reports the difference as its own figure. See Docs/accounting.md.

APFS clones are reported as duplicates. Copying a file in Finder does not copy its blocks. Such a pair is genuinely identical in content, but deleting one frees nothing. There is no public API to tell a clone from an independent copy, so Silt says so instead of pretending.

Deleting

Two rules, both deliberate:

Moving to the Trash frees no space. The Trash is a folder on the same volume. Silt says so every time rather than reporting gigabytes reclaimed that will not show up in Finder.

The guard refuses before it deletes. Nothing outside your home directory, nothing within two levels of its root, nothing on a list of directories that hold irreplaceable data, nothing reached through a symbolic link that leads out. A path is removable only if every check passes; anything unexpected is a refusal. It is tested from the refusing side.

Full Disk Access

Without it, several hundred folders — Mail, Messages, Safari, other users — are invisible, and their contents are missing from every total. Silt counts them, says how many, and offers to open the settings pane.

Note that a development build is signed ad-hoc, so every rebuild looks like a different application to macOS and the grant is dropped. That is expected.

Status

Early. The engine is tested and has been checked against du on real trees; the interface has not been through anything but use. Issues and pull requests welcome.

About

Disk space analysis for macOS, and an honest account of what is safe to delete.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages