Where a mobile developer's disk goes: simulators, SDKs and three build systems
iOS, Android and cross-platform work each bring their own caches. A map of every one, what was measured on a real Mac, and the order to clear them.
Mobile development is the most storage-hungry kind on a Mac, because it installs whole operating systems as simulators and emulators, and because a cross-platform app runs three build systems at once.
The map
| What | Measured here | Typical range | Guide |
|---|---|---|---|
| iOS Simulator runtimes | not installed | 5 to 8 GB each | iOS Simulator |
| Xcode DerivedData | 0 | grows per project | DerivedData |
| Xcode device support | 0 | several GB per iOS version | Xcode archives and device support |
| Command Line Tools | 2.0 GB | about 2 GB | Command Line Tools |
| Gradle | 1.0 GB | grows with every dependency | Gradle |
| JDKs | 1.5 GB | 0.3 GB each | JDKs |
| Expo | 0.6 GB | grows per SDK | Expo |
| Android emulator images | not installed | several GB each | Android images |
| CocoaPods | not used | a few GB | CocoaPods |
The order to clear
- Simulator runtimes and emulator images for OS versions you no longer target. Largest per item.
- DerivedData, all of it. It rebuilds on the next build.
- Device support for iOS versions no device of yours runs any more.
- Gradle caches for dependency versions you have moved off.
- Duplicate JDKs, of which this Mac had four.
xcrun simctl delete unavailable 2>/dev/null
du -sh ~/Library/Developer/* ~/.gradle ~/.android ~/.expo 2>/dev/null | sort -hCross-platform doubles it
React Native and Flutter run both native build systems plus their own. Each project carries its own caches too, listed in React Native and Metro caches and Flutter taking up space. For a Mac with a small disk, an external SSD for simulators and build output is the long-term answer, in external SSDs for developers.
Common questions
What uses the most space for iOS development?
Simulator runtimes, Xcode's DerivedData and device support files, all in ~/Library/Developer or managed by Xcode.
Is it safe to delete Xcode DerivedData?
Yes. It is build output and is recreated on the next build, which is slower once.
How much space does Android development take on a Mac?
Gradle caches, JDKs and emulator images. On the Mac measured Gradle was 1.0 GB and JDKs 1.5 GB without any emulator images.
Why is cross-platform development so heavy on storage?
Because React Native and Flutter run the iOS and Android build systems as well as their own, each with separate caches.