I kept running out of space on my Mac. I'd search for big files, delete a few, and be back at the bottom a few days later. The problem wasn't big files. It was a huge number of medium-sized ones, created by my development tools.
So I asked Claude Code to go folder by folder with me. At the first check I had 19 GB free on a 460 GB drive. When we stopped, I had 164 GB.
The five steps below account for about 116 GB of that, measured as the change in free space. The rest came from changes we didn't track.
What we cleared
| Step | Space gained |
|---|---|
| Project build folders | 25 GB |
| Gradle, npm, Xcode DerivedData and old Android Studio caches | 33 GB |
| JetBrains, Chrome, Spotify and iOS Simulator system caches | 27 GB |
| Four old iOS simulator versions | 22 GB |
| Nine old Kotlin/Native compilers | 9 GB |
| Total | 116 GB |
The first three steps are mostly things that get rebuilt or downloaded again. The tradeoff is slower builds the next time, and some of that space will fill back up.
Where it was hiding
macOS Storage settings showed 237 GB of "System Data," which doesn't tell you what to do. Looking at folders did:
- Build folders. My projects held well over a hundred of them.
- Caches for tools I'd moved on from. Caches from older Android Studio versions were still there. JetBrains caches took about 20 GB, mostly from Fleet and IntelliJ, and we didn't find either app installed.
- Simulators. I had five iOS simulator versions installed. We kept one, 26.5. An 8.5 GB download for iOS 18.5 was still on disk right after we removed it.
- Kotlin/Native. This is JetBrains' compiler for turning Kotlin into native code, which in my Kotlin Multiplatform apps means the iOS side. Gradle downloads the version each project asks for. I had eleven. We kept two, and that folder went from 14 GB to 5.3 GB.
"Delete the build folders" is almost right
This is the part that's easy to get wrong. A build folder is supposed to be disposable. Some of mine weren't:
- Swing videos and round data from testing Golf Sparks were sitting inside one. A rebuild would never bring those back.
- Release files were in there too: app bundles, iOS archives and
mapping.txtfiles. Without the right mapping file or archive, you may not be able to read a crash report from a version you've already shipped. - A few build folders held files tracked by Git.
So we only removed build folders that Git ignored, left the videos and data in place, and copied the release files and old IDE local history somewhere safe first.
Two traps
Reported sizes aren't always recoverable space. The folder sizes added up to more than we got back. Chrome had 17 GB of temporary copies that probably used very little real space, because macOS can let copies share the same data. Measure free space before and after.
Don't just keep the newest Kotlin compiler. My projects don't all upgrade at the same time. A safer rule is to keep every version a project references, plus the newest one.
Turning it into a skill
I don't want to do this by hand again, so we turned it into an agent skill called free-storage ↗, with a script that:
- Reports first. A scan deletes nothing, and cleanup only previews until you add
--yes. - Protects what it can recognize. Inside build folders it keeps things like videos, CSV files and signing keys, and it backs up release files. It can't recognize every file you made by hand, so read the preview.
- Leaves judgment calls to you. It reports on things like simulator versions, Android SDK files and Docker data, but doesn't delete them.
- Can prune old Kotlin/Native versions automatically. This is an optional macOS background task that runs when a new version arrives, and weekly. It keeps referenced, pinned, in-use, newest and just-downloaded versions.
The cleanup above came first and the script came after it. We tested its Kotlin and build-folder rules on a fake home folder, then ran its report on my real one. Its other cleanup types and the automatic task haven't been run for real yet. It's for Mac only.
If your Mac is always nearly full and you build apps on it, stop looking for the one giant file. Ask your agent to measure your folders, and have it show you the list before it deletes anything.






