I had 97% disk space used (about 6GB), and a memory pressure warning. I hadn’t installed any large programs. It turned out I had a lot of caching, session logs and processes from my AI coding tools.
I made a CLI tool called unclog. It is Free and Open Source (MIT Licence), for macOS, Linux and Windows. You can see what Claude Code, Cursor, VS Code, Windsurf, Ollama, LM Studio, Hugging Face, Docker, MCP server and your package managers are using, and clean whichever you want.
What it found on my machine:
15.1 GB reclaimable (2859 items):
| Tool | Reclaimable | Risk |
|---|---|---|
| pnpm | 7.78 GiB | safe |
| Claude Code | 2.14 GiB | review |
| npm | 1.66 GiB | safe |
| Go build cache | 1.39 GiB | safe |
| Windsurf | 1.13 GiB | safe |
| VS Code | 0.94 GiB | safe |
In dry run mode I could send 12.6 GB to the Trash with no risks.
Install:
brew install --cask NiharRan/tap/unclog (or scoop install unclog)
unclog scan
unclog clean --dry-run
unclog clean
By default files will be sent to the Trash. If you want to delete permanently then you need to add the --permanent flag.
Orphaned Processes
MCP servers, Language servers and Dev servers can often get left running when you stop the application. This takes up RAM.
unclog ps
unclog kill --orphans --dry-run
unclog kill --orphans
It will try to send a SIGTERM to the process. It will never kill another user’s processes or processes it couldn’t match.
Why I feel comfortable to run it:
No random paths, only paths generated by the detectors.
Hard denylist of locations such as home root, Documents, Desktop, Downloads, .git, .env, SSH/GPG keys, Browser profiles.
Symlinks are followed but if they aren’t within the expected root then they’ll be denied.
Never touch config or auth files.
All actions are logged to ~/.config/unclog/history.log
No internet calls or telemetry.
Only caches that can be regenerated are selected by default. Session logs are set to a review risk and downloaded models are set to careful.
Full tutorial:
Learn more about flags, risks, unclog doctor, config and faq in my full walkthrough here: AI coding tools hid 15 GB on my Mac. unclog found it
View code and issues. Star to help others find it.
Top comments (0)