Mac Disk Space Widget
A native macOS menu-bar app that monitors free disk space and offers confirmation-gated cleanup for developer caches. Built after a storage crisis revealed how much invisible tooling bloat accumulates.
My Mac dropped to 1.6 GB free with no obvious explanation.
The usual panic path is to download some free cleanup app, let it delete things you do not fully understand, and hope for the best. I did not want to do that.
So I started diagnosing manually.
What I found was not large files. It was invisible accumulation. The kind that developer machines collect silently over months.
The biggest culprits:
~/Library: 101 GB~/Codes: 145 GB (including a project that had generated 54 GB of outputs and uploads)~/.cache: 51 GB~/.npm: 40 GB- Docker Desktop: 47 GB
- Hugging Face model cache: 42 GB
- Playwright and Puppeteer browser binaries: 13 GB
None of this shows up obviously in Finder. It sits in hidden directories, package manager stores, and Docker layers that accumulate every time you build, install, or run a model.
The cleanup was careful. Only clearly safe targets. Npm, pnpm, pip, uv caches, Homebrew cleanup, browser automation binaries, Docker build cache, old generated project outputs. Docker volumes were left alone.
After cleanup: 176 GB free. The Data volume went from 425 GB used to 252 GB.
Rather than leave it as a one-off terminal session, I converted the diagnosis into a reusable tool.
First version was a shell script. disk-health.zsh. Covering fast disk checks, APFS snapshot inspection, Docker usage, and a deep directory scan.
Then the requirement changed. I wanted something visible without opening a terminal. So I built a native macOS menu-bar app in Swift and AppKit, using only Command Line Tools. No full Xcode.
The app shows free space directly in the menu bar. Click it and you get current disk status, a details panel, a refresh option, and explicit cleanup actions that each require confirmation before running.
Cleanup options built in:
- Developer caches (npm, pnpm, pip, uv, Homebrew, Playwright, Puppeteer)
- Docker build cache
- Docker system prune without volumes
Docker volume cleanup is deliberately excluded. The safety model is: nothing happens automatically, every action needs a confirmation, and the most destructive option is not offered.
The project lives at ~/Codes/personal-projects/mac-disk-space-widget with a build script, a launchd plist for launch-at-login, and install/uninstall scripts.
The broader lesson from the build: developer machines quietly accumulate storage from package managers, local model caches, browser automation binaries, Docker build layers, and generated project data. The solution is not a cleanup app you trust blindly. It is knowing where your disk goes and having a tool that shows you before things get critical.