How to clear Xcode DerivedData and reclaim Mac storage
If your Mac's storage keeps vanishing, Xcode is a prime suspect. Between DerivedData, old iOS simulators, and device support files, a working iOS/macOS developer routinely loses 20–60 GB to build artifacts that most disk cleaners never even look at.
What is DerivedData, and why is it so big?
DerivedData is where Xcode stores everything it generates while building: intermediate build products, indexes for code completion, logs, and module caches. It lives at:
~/Library/Developer/Xcode/DerivedDataIt grows with every project and every build, and Xcode almost never cleans it up on its own. A single large project can leave several gigabytes behind; across a career's worth of repos, it snowballs. The good news: DerivedData is safe to delete — Xcode simply regenerates whatever it needs on the next build (the first build after clearing is just slower).
Clear DerivedData by hand
- Quit Xcode so nothing is in use.
- In Xcode you can go to Settings → Locations and click the small arrow next to the Derived Data path to reveal it in Finder.
- Or clear it straight from the terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData/*Heads up: rm -rf deletes immediately and permanently — there's no Trash, no undo. Double-check the path before you run it, and make sure Xcode is closed.
The other Xcode space hogs
Unavailable iOS simulators
Old and duplicate simulators pile up every time you update Xcode. Remove the ones macOS has marked unavailable:
xcrun simctl delete unavailableOld iOS device support
Every physical device and iOS version you've ever debugged leaves a DeviceSupport folder. Old ones are rarely needed again:
~/Library/Developer/Xcode/iOS DeviceSupportDelete the version folders you no longer debug against.
Beyond Xcode: the rest of the dev-cache iceberg
Xcode isn't the only culprit. On most developer Macs you'll also find gigabytes hiding in:
~/.npmandnode_modulesacross old projects~/Library/Caches/pip,~/Library/Caches/Homebrew- Docker images and build layers
- Stale logs and app caches in
~/Library
Or reclaim all of it, safely, in one click
Vaulith finds Xcode DerivedData, simulator caches & logs, device support, npm/pip caches, and the rest of the hidden dev-cache iceberg — safety-verifies each location, shows you exactly what it found, and moves it to the Trash so you can review and undo. It runs 100% on your device; your files never leave your machine.
Download for macOS & Windows — FreeFrequently asked questions
Is it safe to delete DerivedData?
Yes. DerivedData contains only generated build artifacts and indexes — no source code. Xcode regenerates it automatically; the only cost is a slower first build.
Will clearing DerivedData delete my projects?
No. Your source, git history, and project files live in your own repositories, not in DerivedData.
How much space will I get back?
It varies with how many projects you build and how long it's been. Active iOS developers commonly recover 20–60 GB once simulators and device support are included. Individual results vary.