Engineering notes / Desktop apps
Your Mac looks fine. Until you notice this.
Mac storage full for no reason? On a developer Mac, the culprit is usually folders that outlived the thing that created them.


You open System Settings, go to Storage, and the bar is nearly at the right edge. You've deleted old videos, cleared Downloads, emptied the Trash. The Mac still says it's almost full. Nothing looks unusually big. Nothing looks wrong. The space keeps disappearing anyway.
It feels a lot like the first time you look at a really good AI image. Smooth skin, soft light, everything perfect, and yet something is off that you can't name. You check the hands, count the fingers, look for warped text. Nothing.
That's because we're looking for the wrong kind of mistake.
We're looking for the wrong mistake
Look closely at the eye above. Right in the middle of the pupil sits a sharp, eight-pointed star of light. The image was generated by AI for this article, and that highlight is what gives it away.
Photographers call the highlight in an eye a catchlight. It is a reflection of the light source: a window makes a rectangle, a softbox a square, a ring light a ring. No lamp makes a neat star carved inside an iris. The model learned what a reflection looks like, not why it's there.
The tell in an AI image is rarely something ugly. It's something with no reason to exist. One principle sums it up:
Look for effects without a cause.
A developer's Mac is full of them. Every folder once had a cause: a project, an app, a chat session with an AI agent. The cause left. The effect stayed on disk, and it doesn't look "wrong" at all. It looks like an ordinary folder, which is exactly why you skip it.
Why developer Macs fill up faster
Developer tools are built to remember. npm keeps every package it downloaded so the next install is faster. Xcode keeps build products so the next build is faster. Claude Code and Codex keep a transcript of each session so you can go back. Each choice makes sense while the project is alive.
The problem is that almost no tool asks the follow-up question: does this project still exist? You delete ~/code/old-app, but what it created elsewhere doesn't leave with it. In macOS Storage settings, most of that space gets split into broad buckets like Developer, Documents or System Data. You see a number, not a cause.
Here are six cases, from the most obvious to the best hidden. Every check command is read-only. Any command that deletes is labeled as deleting. Every size in the images is example data, not from a real Mac.
Case 01 · Easy · node_modules for abandoned projects

Last year's landing page is done, and you haven't opened it since. Its node_modules folder is still there, untouched. Multiply that by every experiment, every course, every repo you cloned just to read, and it adds up fast.
The cause (a project under active development) is gone. The effect (all of its dependencies) stayed.
Check (read-only):
find ~/code -maxdepth 3 -type d -name node_modules -prune -exec du -sh {} +Change ~/code to wherever you keep projects. To see how long a project has been idle: ls -ldT ~/code/project-name.
Clean (this DELETES): rm -rf ~/code/project-name/node_modules. Keep package-lock.json; when you come back, npm install downloads everything again. You pay in install time, not data.
Case 02 · Easy · Xcode DerivedData for an app that no longer exists

Xcode stores each project's build products in a folder inside ~/Library/Developer/Xcode/DerivedData, named after the project plus a string of letters. Delete the project and that folder still carries its name, like a headstone.
This is the cleanest example of the principle: the folder name points straight at its cause, and the cause is gone.
Check (read-only):
ls ~/Library/Developer/Xcode/DerivedData
du -sh ~/Library/Developer/Xcode/DerivedDataIs it safe to delete Xcode DerivedData? For a deleted project, yes. For a project you still use, it's safe too; the next build is just slower because Xcode rebuilds from scratch.
Clean (this DELETES): remove only the folder for the missing project, for example rm -rf ~/Library/Developer/Xcode/DerivedData/OldApp-*. Quit Xcode first.
Case 03 · Medium · iOS simulators marked "unavailable"

You removed an old iOS runtime to free space. The simulators built on that runtime didn't go with it. They stay behind, marked "unavailable", with their apps and data inside.
This one is harder to see because it lives in a folder you never open. Next door is ~/Library/Developer/Xcode/iOS DeviceSupport, where Xcode keeps data for each iOS version of every device you've plugged in, including the iPhone you sold long ago.
Check (read-only):
xcrun simctl list devices unavailable
du -sh ~/Library/Developer/CoreSimulator/Devices ~/Library/Developer/Xcode/iOS\ DeviceSupportClean (this DELETES): xcrun simctl delete unavailable deletes those simulators and the apps and data inside them. They don't come back; you create new simulators when you need them.
Case 04 · Medium · Package caches for projects that are gone

npm, pip, Cargo and Homebrew all keep what they download so the next install doesn't have to. The cache doesn't know which projects you deleted. It keeps a dead project's packages exactly like a live one's.
This is harder than the first two cases because there's no project name to compare against. The causes are mixed together in one store.
Check (read-only):
du -sh ~/.npm/_cacache ~/Library/Caches/pip ~/.cargo/registry "$(brew --cache)"
brew cleanup -nbrew cleanup -n only prints what would be removed; it deletes nothing. If a folder doesn't exist on your Mac, du says "No such file", which is harmless.
Clean (these DELETE caches): npm cache clean --force, pip cache purge, brew cleanup. Your tools re-download what they need on the next install.
Case 05 · Hard · AI chat history for folders you deleted

This is the case people get wrong most often.
Claude Code saves each session's transcript as a plain-text JSONL file in ~/.claude/projects/, one folder per project, named after its path (for example -Users-you-code-old-app). According to the Claude Code docs, old sessions are cleaned up after about 30 days by default; the setting is cleanupPeriodDays. Codex keeps sessions in ~/.codex/sessions/year/month/day/. Cursor keeps per-workspace state, chats included, in ~/Library/Application Support/Cursor/User/workspaceStorage; Cursor users report entries kept for folders deleted long ago.
It looks exactly like a cache folder. It isn't one. Delete node_modules and npm install brings it back. Delete a transcript and no tool rebuilds it. Without a backup (Time Machine, for example), that conversation is gone.
Check (read-only):
ls ~/.claude/projects ~/.codex/sessions
du -sh ~/.claude ~/.codexFor each folder in ~/.claude/projects, turn the - back into / to get the original path, then ls that path. Claude Code turns every character that isn't a letter or digit (dots and underscores too) into -, so folder names that contain those take a little guessing. "No such file or directory" means the cause is gone.
Clean: no delete command here, on purpose. Read or save a copy of the sessions you still need first. Never delete the whole Cursor folder.
Case 06 · Expert · An API key inside a plain-text transcript

The best-hidden case barely takes any space. What it costs you is security.
Transcripts are plain text. Anything you ever pasted into a chat with an agent, including an API key for a "quick test", is in there. The project is deleted, the session forgotten, and the key is still on disk.
Check (read-only, prints file names, never the key):
grep -rlwE "sk-[A-Za-z0-9_-]{20,}" ~/.claude/projects ~/.codex/sessionsThis only catches sk-… style keys (OpenAI, Anthropic style), not AWS or GitHub keys. Older Codex sessions may be compressed to .jsonl.zst, which grep can't read. No result doesn't guarantee no key.
Found a file with a key: rotate the key at the provider first, then clean the file. Deleting the file doesn't un-leak the key.
Read a dev Mac like a photographer reads catchlights
A portrait photographer looks at the highlights in an eye and can tell where the lights were, how big, and how many. Every catchlight needs a matching light source. A highlight with no source tells them right away that something is off.
You can read a Mac's disk the same way. For every large folder, ask two questions:
- What created this, and does it still exist?
- If I delete it, will it come back?

Question 1 finds the effects without a cause. Question 2 decides what you're allowed to do with them. Almost everything big on a developer Mac falls into one of four groups:
- Comes back: node_modules, DerivedData, npm/pip/Cargo/Homebrew caches. You pay in build time, not data.
- Needs your OK: iOS simulators, Docker images. What's inside is gone; you re-pull or reinstall.
- Your history:
~/.claude/projects,~/.codex/sessions, Cursor chats. Delete it and it's gone. - Never touch: source code,
.git,.env, SSH keys, Keychains.
Size doesn't tell you which group a folder is in. Group 3 is the one people get wrong, because it sits right next to caches and looks like one.
Conclusion
- A full Mac isn't always about big files. On a developer Mac, it's usually folders that outlived their cause.
- Don't look for what looks bad. Look for what has no reason to exist: effects without a cause.
- Before you delete, ask two questions: what created this and does it still exist; will it come back.
- Caches and build output can go. Chat history gets read or saved first. Keys get rotated first.
- Run the read-only check first. Run the delete second, and only when you know what it deletes.
You can do all of this in Terminal with the commands above. If you'd rather not walk every folder by hand, that's why we built Haikos Clean.
Haikos Clean asks those two questions for every row

Haikos Clean is Haikotek's Mac app for people who code on a Mac, especially with AI. It finds the caches, old agent sessions and build folders that Cursor, Claude Code, Codex, Xcode and your package managers leave behind, then does what this article does, row by row:
- What created this: every row says what it is, which tool made it and how big it is.
- Does it still exist: projects are grouped by lifecycle, including "Folder gone" for projects whose folder no longer exists. Projects open in an editor are left alone.
- Is it safe to remove: every row says whether it can be made again. Docker images and simulators are never ticked for you. Source code,
.git,.envand keys are never offered for cleaning.
Then it moves only what you pick to the Trash (simulators wait 7 days in the Safety Net instead). Every clean leaves a receipt, and you can put back anything still in the Trash with Restore (free).
For the two hardest cases:
- AI Chats: save a readable copy of old Cursor, Claude Code and Codex sessions before you clean them.
- Secrets: finds API keys sitting in logs and chats. Keys are shown masked, never in full.
One thing to say plainly: since version 1.0.2, the app does not clean Docker, the pnpm store or simulator runtimes itself. It shows them with the Terminal command so you can run it yourself.
It scans on your Mac. Files are never uploaded. No account, no analytics, no tracking.
Install Haikos Clean
Requirements: a Mac with Apple silicon, macOS 12 Monterey or later. Free to download; Pro is a one-time purchase with a 14-day trial.
1. Mac App Store (available now, recommended). Get Haikos Clean on the Mac App Store. The App Store version asks you to choose your Home folder once and never asks for Full Disk Access. You buy and update through the App Store.
2. Direct download (signed .dmg). The direct download is the same app; it asks for Desktop and Downloads access (for the Desktop & Downloads screen) and, optionally, Full Disk Access so it can see caches inside ~/Library. Payment for this version goes through Paddle.
3. Homebrew. Install it with:
brew install --cask haikotek/tap/haikos-cleanFull details at haikosclean.haikotek.com.
Next step: See Haikos Clean or get it on the Mac App Store. Planning a Mac or desktop app for your team? See Custom software · Book a 30-min call · Message us on Zalo: +84 862 881 426
FAQ
Why is my Mac storage full when I don't have many files?
On a developer Mac, most of the space usually sits in caches and build folders your tools create on their own: node_modules, Xcode DerivedData, the npm cache, simulators, AI chat history. macOS groups them into broad buckets like Developer or System Data, so you see the number but not the cause. Run du -sh ~/.claude ~/.codex ~/.npm ~/Library/Developer/Xcode/DerivedData (read-only) to see.
Is it safe to delete Xcode DerivedData?
Yes. Xcode makes DerivedData again on the next build; you only lose build time. Quit Xcode first.
Is it safe to delete node_modules?
You lose no data as long as you keep package.json and the lock file. npm install downloads it again when you come back to the project.
What is ~/.claude/projects, and should I delete it?
It's where Claude Code keeps each session's transcript as plain text. Deleting it is permanent; no tool rebuilds it. Read or save a copy first, and check whether an API key was pasted in.
How do I free up space on a developer Mac for free?
Use the read-only commands in this article to find the folders, then clean the groups that come back (node_modules, DerivedData, package caches). Haikos Clean is also free on the Mac App Store, and the free version already scans, cleans to the Trash and restores.
Does Haikos Clean clean Docker?
No. Since version 1.0.2, Docker, the pnpm store and simulator runtimes are shown with Terminal commands so you can clean them yourself.
Can I install Haikos Clean with Homebrew?
Yes. Run brew install --cask haikotek/tap/haikos-clean. You can also download the signed .dmg or get it from the Mac App Store.
Does Haikos Clean run on Intel Macs?
No. It needs a Mac with Apple silicon and macOS 12 Monterey or later.
Sources
- Claude Code docs: Manage sessions, "Where transcripts are stored" (the
~/.claude/projectspath, 30-day retention,cleanupPeriodDays). - OpenAI Codex: codex-rs/rollout/src/compression.rs and PR #28338 (sessions filed by date,
.jsonl.zstcompression). - Cursor forum: where chat history is stored (
~/Library/Application Support/Cursor/User/workspaceStorage). - Haikos Clean on the Mac App Store (version 1.0.2, macOS 12+, release notes) and haikosclean.haikotek.com (features, distribution, pricing).
All sizes and Terminal output in this article are example data, not from a real Mac. The eye is an AI-generated image made for this article. Feature and distribution details were checked against haikosclean.haikotek.com and the App Store listing on 18 Nov 2026.