Xcode DerivedData: Reclaim 50GB on Your Mac
Xcode stores build artifacts in DerivedData. It is usually safe to delete after you quit Xcode. Here is how to find it on the map without Terminal.
- Xcode
- DerivedData
- Developer
If you build iOS or macOS apps, ~/Library/Developer/Xcode/DerivedData is probably eating more SSD than your repositories. Twenty to eighty gigabytes is common. Simulator runtimes and DeviceSupport next door can add another twenty. Apple files all of that under System Data or Other, so Settings looks haunted.
This is everyday life for developers in London, Berlin, Toronto, Sydney, and the US — anywhere Xcode is installed. The folder is safe to clear after you quit Xcode. The next build is slower. Your source code is not in DerivedData.

What DerivedData is
Xcode caches:
- Intermediate
.oand module files - Indexes for jump-to-definition
- Test results and coverage
- Swift package checkouts for some project shapes
Each project gets a hashed folder. Old targets you have not opened in a year still sit there. Xcode recreates what it needs.
Related folders that are not DerivedData
| Path | Safe to remove? | Notes |
|---|---|---|
~/Library/Developer/Xcode/DerivedData | Usually yes | Quit Xcode first |
~/Library/Developer/Xcode/Archives | Review | .xcarchive files you may still need for App Store |
~/Library/Developer/CoreSimulator | Review | Unused runtimes: Xcode → Settings → Platforms |
~/Library/Developer/Xcode/iOS DeviceSupport | Review | Symbols for physical devices you no longer own |
~/Library/Developer/Xcode/UserData | No | Keybindings, themes, snippets |
Do not delete UserData because a map painted it purple. Zoom until you see DerivedData or a named simulator runtime.
Is it safe during a build?
No. Quit Xcode (and any xcodebuild / CI agent on that Mac). Then delete. If a build is running, you will corrupt that build and maybe confuse file locks.
Find it without du
- Download FreeUpMac and scan Home.
- Look for a block tagged Xcode DerivedData · Review.
- Double-click
Developer, thenXcode, thenDerivedDataif you want to delete one project folder instead of all of them. - Confirm the path in the inspector.
- Pro moves the folder to Trash (Bin on UK Macs). Empty only when you are sure.
Terminal equivalent if you insist:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Same rule: Xcode quit, then remove. A map is harder to fat-finger onto UserData.
Simulators
Xcode → Settings → Platforms (or Components, depending on version) lists iOS runtimes. Delete iOS 16 if you only ship on iOS 18. Those images are multi-gigabyte and count as System Data. The map shows CoreSimulator as its own rectangle.
Swift packages and SPM caches
Some caches live under ~/Library/Caches/org.swift.swiftpm or in DerivedData. If a block is named after a package you still use, expect the next resolve to re-download. That is expected, not data loss.
After cleanup
Open the project. First compile is slow. Indexes rebuild. If Xcode offers to re-download a platform, that is the simulator you removed on purpose.
Scan Home again. If the disk is still tight, check Docker.raw, node_modules, and local snapshots. Developer laptops usually have all four.
Archives
Archives is not DerivedData. Those .xcarchive bundles are what you submitted, or almost submitted, to App Store Connect. Delete only archives you can reproduce from git tags. Reveal in Finder (Pro) and look at the date.
Why a map beats du -sh
du works. It does not show Archives vs DerivedData vs DeviceSupport as sibling blocks you can compare in one glance. It also does not stop you from deleting the wrong sibling. FreeUpMac’s Review label is there because DerivedData is usually safe, not always the folder you meant.
Scan is free. Pro is $12.99 USD once if you want Trash from the inspector — pricing.
CI machines and build agents
A Mac mini in a closet running Xcode every hour will refill DerivedData by Thursday. Cleanup is a calendar event, not a one-off. Keep archives you still need; wipe DerivedData on a schedule. Do not wipe UserData in a cron job.
SPM, CocoaPods, and Carthage
CocoaPods Pods/ belongs to the repo; it is not DerivedData. Carthage Build/ is closer to derived data but lives in the project. The map will show them as project-folder blocks, not as Xcode DerivedData. Delete according to the tool’s docs, then pod install / carthage bootstrap if the project is alive.
Preview and SwiftUI canvases
Canvas previews write into DerivedData. If you delete mid-session, previews break until Xcode restarts. Save, quit, then clean.
Notarization folders and Export
ExportOptions.plist outputs and Organizer exports can sit in ~/Library/Developer/Xcode/Products or on the Desktop. They are not DerivedData. If you ship weekly, look there before you buy a bigger SSD.
When DerivedData is gone and the disk is still full, you are in Docker / snapshots / Photos territory. Start with the storage-full path rather than deleting more Xcode folders at random.
See your Mac as a map
Free download. Pro unlock is one-time ($12.99) — no subscription.
Related guides
Docker.raw: Why Your Mac Is Full After Prune
docker system prune does not always shrink Docker.raw on macOS. The virtual disk stays large until you compact or reset it. Here is how to see the real size.
DockerFind node_modules Folders Eating Mac Storage
Abandoned JavaScript projects leave 500 MB–2 GB node_modules trees. Learn how to find them on a Mac disk map without a risky recursive rm.
node_modulesDaisyDisk Alternative: Free Map, One-Time Pro
DaisyDisk is the classic paid Mac treemap. FreeUpMac is a notarized map you can scan for free, with a $12.99 USD unlock for Trash, Reveal, and snapshots.
DaisyDisk