r/coolgithubprojects • u/Muted-Thought8181 • 15m ago
ketodisk - Lossless macOS APFS storage optimizer in Rust that frees up gigabytes without deleting a single file
github.comHey, I built this! I kept running low on Mac SSD space and wanted a free, open-source way to reclaim storage from the files I actually want to keep instead of just wiping caches.
Under the hood it uses native macOS APFS features that the OS rarely applies to existing files on its own: copy-on-write cloning for exact duplicates, native transparent LZFSE compression (Finder and your apps still read everything normally, no zip files), and fixed-offset 4K block sharing for large similar files like datasets or backups.
Everything is preview-only by default. Before replacing any file, it stages a copy, checks the full SHA-256 hash to confirm it reads back byte-for-byte identical, skips iCloud offloaded files so it won't trigger downloads, and skips files currently open in other apps. There's also an interactive menu if you just type `ketodisk` (with Finder drag-and-drop) so you don't have to memorize flags.
If you want to try it without touching any of your real files:
brew install subwaycookiecrunch/tap/ketodisk
ketodisk bench
Quick caveats: already-compressed media (MP4, JPG, ZIP) won't shrink much, Time Machine local snapshots can delay Finder updating free space, and avoid running it on live databases or active VMs. MIT licensed and 100% local, happy to take any feedback or code review!
