Free up storage
Xcode Eating 50GB of Your Mac? How to Reclaim It
Xcode and its caches routinely eat 50-100GB on a Mac. Here's exactly which folders to clear and which simulators to delete.
Xcode is the single biggest storage-hog on most Macs that have ever installed it. The application itself is around 12-15GB, which is bad enough. The caches, simulator runtimes, derived data, archives, and device support files routinely add another 40-80GB. After a couple years of use, an active iOS developer’s Mac can have 100GB+ in Xcode-related storage that nothing in the standard cleanup process touches.
If you don’t actively use Xcode, the answer is simple: uninstall it. If you do use Xcode, this guide walks through what’s safe to delete, what’s worth keeping, and how to keep it from spiraling again.
The usual suspects, in order of size
Here’s where Xcode hides its bloat, ranked by typical size:
- DerivedData —
~/Library/Developer/Xcode/DerivedData/(20-50GB) - iOS DeviceSupport —
~/Library/Developer/Xcode/iOS DeviceSupport/(10-30GB) - CoreSimulator Devices —
~/Library/Developer/CoreSimulator/Devices/(10-30GB) - CoreSimulator Caches —
~/Library/Developer/CoreSimulator/Caches/(5-15GB) - Archives —
~/Library/Developer/Xcode/Archives/(5-15GB) - Xcode Caches —
~/Library/Caches/com.apple.dt.Xcode/(2-8GB) - The Xcode app itself —
/Applications/Xcode.app(12-15GB) - Xcode UserData —
~/Library/Developer/Xcode/UserData/(small but worth knowing about) - iOS Simulator Runtimes — bundled inside Xcode and at
/Library/Developer/CoreSimulator/Profiles/Runtimes/(5-30GB)
The first four are the highest-value cleanup targets.
DerivedData: nuke it without thinking
DerivedData stores intermediate build artifacts — compiled object files, indexing data, module caches, build logs. Xcode regenerates everything in here on next build.
To clear:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Or via Xcode UI: Window → Projects → click the small arrow next to “Derived Data” for the relevant project → “Delete…” button.
The next time you build a project, Xcode rebuilds DerivedData from scratch. First build is slower than usual; subsequent builds are normal.
For a typical iOS developer with 5-10 active projects, DerivedData is 20-40GB. The single biggest Xcode storage win.
iOS DeviceSupport: usually safe to clear
When you connect any iPhone or iPad for development, Xcode downloads “device support” files — debug symbols and support binaries for that specific iOS version. These accumulate forever.
Folder: ~/Library/Developer/Xcode/iOS DeviceSupport/
Inside, you’ll see folders named with iOS versions and build numbers:
17.0 (21A329)
17.1 (21B74)
17.2 (21C62)
...
Each is 1-3GB. After a few years of iOS updates, this folder is 20-30GB.
What’s safe to delete:
- Any iOS version you no longer have devices running
- Old beta versions you tested briefly
- Anything from before the current iOS major version (e.g., on Xcode 16 working with iOS 18 devices, all iOS 17 and earlier folders can usually go)
What to keep:
- The version your current development device runs
- The previous major version if you support older iOS versions
If you delete a version and need it later, Xcode re-downloads it next time you connect a device running that OS. So worst case, you’re inconvenienced for one minute.
To delete: just drag the version folders to Trash. Or via Xcode → Window → Devices and Simulators → right-click your device → manage device support files.
CoreSimulator: where simulator runtimes live
Each iOS Simulator device — iPhone 15, iPhone 14 Pro Max, iPad Air, etc. — uses several GB on disk. Multiply across the dozen+ devices Xcode creates by default, and you’ve got 15-30GB.
Folder: ~/Library/Developer/CoreSimulator/Devices/
To audit and clean: open Xcode → Window → Devices and Simulators → Simulators tab. You can delete individual simulators here.
Better yet, use the command line:
xcrun simctl list devices
Lists every simulator. To delete unused ones in bulk:
xcrun simctl delete unavailable
That removes any simulator whose runtime is no longer installed. Often 5-10GB freed instantly.
To delete all simulators (drastic — Xcode recreates the defaults later):
xcrun simctl delete all
Don’t run this casually. You’ll lose simulator data for all your in-flight test work.
For caches that simulators leave behind: ~/Library/Developer/CoreSimulator/Caches/ is safe to delete entirely.
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
Simulator Runtimes: the hidden gigabytes
Each iOS version supported by your Xcode includes a “runtime” — basically a stripped-down iOS install that Simulators use. Each runtime is 5-15GB.
These live at /Library/Developer/CoreSimulator/Profiles/Runtimes/ (system-wide, not in your home folder).
To list:
xcrun simctl runtime list
To delete a runtime:
xcrun simctl runtime delete <runtime ID>
Or via Xcode UI: Xcode → Settings → Platforms tab → select an iOS version → click the minus button.
Keep the iOS version your project targets, plus maybe one previous version for compatibility testing. Delete the rest.
Archives: keep what matters, delete the rest
Every time you Archive an app for App Store submission, Xcode keeps the archive forever. They’re 100MB-1GB each.
Folder: ~/Library/Developer/Xcode/Archives/
Inside, archives are organized by date. Old archives from apps you’ve shipped — or experiments that never made it — pile up.
What to keep:
- Archives for your currently-shipped App Store builds (so you can re-symbolicate crash reports)
- Recent archives you might still ship
What to delete:
- Anything from apps you’ve stopped maintaining
- Build experiments and debug archives
- Anything older than 1-2 years (you can usually rebuild and re-archive if needed)
To browse: Xcode → Window → Organizer → Archives. Right-click → Show in Finder for any archive, or just delete from Xcode’s UI.
Module caches and other smaller folders
A few smaller targets while you’re cleaning:
~/Library/Developer/Xcode/UserData/IDEEditorInteractivityHistory/— track of file edits, can grow large~/Library/Caches/com.apple.dt.Xcode/— Xcode’s general cache~/Library/Developer/Xcode/iOS Device Logs/— device logs from connected iPhones/iPads~/Library/Developer/CoreSimulator/Devices/<UUID>/data/Containers/Data/Application/— app data inside simulators
All safe to delete. Xcode recreates what it needs.
For a one-shot command that nukes the most common Xcode bloat:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
xcrun simctl delete unavailable
That alone often frees 30-50GB without touching anything you actively need.
If you don’t actively use Xcode
The fastest path: uninstall it entirely.
- Drag
/Applications/Xcode.appto Trash - Run the cleanup commands above to kill the support folders
- Also delete:
~/Library/Developer/(entire folder)~/Library/Caches/com.apple.dt.Xcode/~/Library/Caches/com.apple.dt.xcodebuild//Library/Developer/CoreSimulator/
This frees 50-100GB on a Mac that had Xcode but barely used it. If you ever need Xcode again, reinstall from the App Store — takes 30 minutes but starts clean.
How to keep Xcode from spiraling again
A few practical habits:
- Clear DerivedData monthly. It’s the fastest-growing folder and the lowest-cost to delete. Set a calendar reminder.
- Delete old DeviceSupport quarterly. When you stop testing on an iOS version, delete its DeviceSupport folder.
- Prune simulators. When Xcode adds new simulator devices in updates, the old ones often stay around. Periodic pruning prevents accumulation.
- Archive only what matters. Don’t archive every build “just in case” — only archives you might submit to the App Store.
- Run
xcrun simctl delete unavailableafter Xcode updates. Each Xcode update sometimes orphans simulators.
For an active developer, applying these habits keeps Xcode at maybe 30-50GB on disk instead of 80-120GB. Big difference.
What’s actually safe to delete and what isn’t
Quick reference:
Safe to delete:
- DerivedData (entire folder)
- DeviceSupport (any iOS version you don’t need)
- Simulator caches
- Old archives
- Xcode UI caches
Don’t delete:
- The Xcode app itself if you actively use it
- Active project source code
- Provisioning profiles in
~/Library/MobileDevice/Provisioning Profiles/(you can re-download from Apple Developer, but it’s annoying) - Your
~/Library/Developer/Xcode/UserData/Provisioning Profiles/if you’re using those for active development - Currently-running simulator devices’ data if you have unsaved work
The honest take: Apple does very little to manage Xcode storage automatically. As of macOS Sequoia 15, there’s still no “clean Xcode caches” button anywhere in System Settings. It’s manual or third-party tooling. Build the cleanup into your workflow once and you’ll save yourself the inevitable “why is my Mac full?” cycle.