Skip to main content
FreeUpMac
← Back to guides

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.

FreeUpMac labelling an Xcode DerivedData block

What DerivedData is

Xcode caches:

  • Intermediate .o and 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

PathSafe to remove?Notes
~/Library/Developer/Xcode/DerivedDataUsually yesQuit Xcode first
~/Library/Developer/Xcode/ArchivesReview.xcarchive files you may still need for App Store
~/Library/Developer/CoreSimulatorReviewUnused runtimes: Xcode → Settings → Platforms
~/Library/Developer/Xcode/iOS DeviceSupportReviewSymbols for physical devices you no longer own
~/Library/Developer/Xcode/UserDataNoKeybindings, 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

  1. Download FreeUpMac and scan Home.
  2. Look for a block tagged Xcode DerivedData · Review.
  3. Double-click Developer, then Xcode, then DerivedData if you want to delete one project folder instead of all of them.
  4. Confirm the path in the inspector.
  5. 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