How to Clean Xcode DerivedData & Simulator Caches on Mac
Xcode is famous for silently eating 20–80 GB of Mac storage. Between intermediate DerivedData build caches, obsolete simulator runtimes, debug symbols, and old archives, here is how to reclaim your SSD without breaking your projects.
Why Xcode takes up so much storage
Every time you build an iOS or macOS project, Xcode creates hundreds of megabytes of intermediate objects, module maps, index databases, and precompiled headers. Over months of development across multiple branches, this folder never cleans itself up.
Intermediate compilation caches, indexes, and build products. Often 15–50 GB.
Old simulator runtimes (iOS 15, 16, 17) and container images at ~5–10 GB each.
Symbols copied from every physical iPhone ever plugged into your Mac.
Old App Store and TestFlight distribution archives with full dSYMs.
Step 1: Delete DerivedData (Save 10–40 GB)
Deleting DerivedData is completely safe. Xcode will regenerate necessary build caches and indexes automatically next time you open and compile your projects.
Option A: Via Terminal (Fastest)
rm -rf ~/Library/Developer/Xcode/DerivedData/*Option B: Via Xcode Settings GUI
- Open Xcode
- Go to Xcode → Settings (or Preferences) → Locations
- Find the Derived Data row and click the small arrow icon next to the path
- Select and delete folder contents in Finder
Step 2: Remove unavailable & obsolete Simulators (Save 10–30 GB)
When Xcode updates to a newer version, old simulator runtimes often become "unavailable" but remain on your disk taking up 5–15 GB per version.
Delete all unavailable simulator instances:
xcrun simctl delete unavailableDelete Simulator runtime download caches:
rm -rf ~/Library/Developer/CoreSimulator/Caches/*To inspect simulator devices on your machine, run xcrun simctl list devices.
Step 3: Delete iOS DeviceSupport symbols (Save 5–20 GB)
Every time you connect a physical iPhone or iPad running a specific iOS build, Xcode copies several gigabytes of debug symbols to:
~/Library/Developer/Xcode/iOS\ DeviceSupportIf you have upgraded devices across multiple iOS versions over several years, this folder often holds 20–50 GB of dead symbols. Run:
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*Note: If you reconnect a device, Xcode will re-index debug symbols in 1–2 minutes if required.
Step 4: Purge old Xcode Archives (Save 5–15 GB)
Past TestFlight and App Store releases are stored indefinitely in your Archives folder. While you should keep recent versions for crash symbolication, builds from 6+ months ago are rarely needed.
open ~/Library/Developer/Xcode/ArchivesYou can review archives by date and delete year-old build folders directly in Finder.
The effortless way: SpaceWise Xcode Purger
Instead of remembering 4 different hidden Terminal paths, SpaceWise scans your entire Xcode developer ecosystem in 300 milliseconds.
- Categorizes DerivedData, Simulators, DeviceSupport, and Archives separately
- Displays last accessed dates so you don't delete today's active workspace cache
- Uses native macOS Trash deletion for 100% reversible peace of mind
Do all of this in SpaceWise — for free
SpaceWise scans and safely cleans everything covered in this guide with one click. No Terminal required.
Download for Mac FreeRelated Guides
How to Free Up Docker Disk Space on Mac
Prune dangling images, BuildKit layers, and unused volumes safely.
How to Delete Abandoned Ollama & Hugging Face Models
Purge stale local AI model weights eating your SSD.
How to Delete node_modules Safely
Free gigabytes from dormant JavaScript projects without breaking anything.