For Developers

How to Clean Xcode Cache and Free Up 30-100 GB

Xcode is one of the biggest storage hogs on any developer's Mac. Here's exactly what you can safely delete and how much space you'll get back.

Where Xcode Hides Your Storage

Xcode stores build artifacts, device support files, simulator data, and old archives across multiple locations in your Library. Most developers don't realize how much space this consumes until their Mac runs out.

Run this to see the full picture:

echo "=== DerivedData ===" && du -sh ~/Library/Developer/Xcode/DerivedData 2>/dev/null echo "=== iOS DeviceSupport ===" && du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport 2>/dev/null echo "=== watchOS DeviceSupport ===" && du -sh ~/Library/Developer/Xcode/watchOS\ DeviceSupport 2>/dev/null echo "=== Simulators ===" && du -sh ~/Library/Developer/CoreSimulator 2>/dev/null echo "=== Archives ===" && du -sh ~/Library/Developer/Xcode/Archives 2>/dev/null echo "=== Caches ===" && du -sh ~/Library/Caches/com.apple.dt.Xcode 2>/dev/null

Typical Space Usage

LocationTypical SizeSafe to Delete?
DerivedData10-50 GBYes, completely safe. Rebuilds on next compile.
iOS DeviceSupport2-5 GB per iOS versionYes for old iOS versions you no longer test on.
CoreSimulator5-30 GBDelete unavailable simulators. Keep ones you test on.
Archives2-20 GBYes for old builds you don't need. Keep recent releases.
Xcode Caches1-5 GBYes, Xcode rebuilds these.

Step-by-Step Cleanup

1. Delete DerivedData (Biggest Win)

DerivedData contains build products, indexes, and logs for every project you've ever opened. This is almost always the biggest folder and is completely safe to delete.

rm -rf ~/Library/Developer/Xcode/DerivedData/*

Xcode will rebuild the data for any project you open next. Your first build will be slower (cold cache), then back to normal.

2. Remove Old iOS DeviceSupport

Every time you connect an iOS device running a new version, Xcode downloads debug symbols for that version. These accumulate over years.

ls ~/Library/Developer/Xcode/iOS\ DeviceSupport/

Delete folders for iOS versions you no longer test against. If you only support iOS 17+, everything below that can go.

3. Clean Up Simulators

Remove simulators that are no longer available in your current Xcode version:

xcrun simctl delete unavailable

For a full reset of all simulators (if you want to start fresh):

xcrun simctl erase all

4. Delete Old Archives

Archives are full app builds stored for App Store submissions and crash symbolication. Old ones from previous app versions are usually safe to remove.

Open Xcode → Window → Organizer → Archives tab. Delete old archives you don't need for crash log symbolication.

5. Clear Xcode Caches

rm -rf ~/Library/Caches/com.apple.dt.Xcode
Also check: non-Xcode dev tools

If you use other dev tools, these can also eat massive storage: Docker (15-60 GB via Docker.raw), node_modules (run npx npkill to find and delete old ones), CocoaPods cache (pod cache clean --all), Homebrew (brew cleanup -s).

How to Prevent It from Growing Back

DerivedData will always grow back as you work. The best approach is to clean it periodically (monthly) or use a tool that does it for you with proper risk classification so you know what's safe.

MacCare cleans dev caches safely

MacCare scans all Xcode and dev tool caches with color-coded risk levels. Green items are safe to delete, orange items might slow down your next build. You always know exactly what you're removing.

⬇ Download Free Trial

$29/year or $69 lifetime · macOS 14+ · Apple-notarized

Related guides

How to free up space on Mac (10 methods)
Mac running slow? 8 fixes
Best Mac cleaner apps 2026