Developer Tools6 min read•

How to Clear Xcode DerivedData, Simulators & Developer Caches on Mac

Software engineers run out of SSD space faster than anyone else on macOS. Between incremental Xcode builds, Swift Package Manager artifacts, node_modules caches and Gradle wrapper distributions, developer caches silently eat 50 GB+ of fast NVMe storage.

MaXpert Care Developer Junk cleanup view on macOS

1. The Biggest Developer Storage Hogs on macOS

Modern build toolchains trade disk space for incremental compile speed. Unfortunately, old project hashes and upgraded compiler toolchains are rarely garbage-collected automatically.

~/Library/Developer/Xcode/DerivedData

Intermediate build products, index stores and module caches for every Xcode project you have ever opened. Completely safe to clean when Xcode is closed.

~/Library/Caches/org.swift.swiftpm

Cloned Git repositories and binary artifacts cached by Swift Package Manager.

~/.npm & ~/Library/Caches/pnpm

Tarball and content-addressable package caches accumulated across JavaScript/TypeScript projects.

~/.gradle/caches

Downloaded Android/JVM dependencies and daemon build caches from older Gradle versions.

2. DerivedData vs. Archives: What Not to Delete Blindly

Clearing DerivedData never harms your source code — Xcode simply performs a clean build the next time you press Cmd + B (which often fixes stubborn SwiftUI preview and indexing glitches too).

Be careful with ~/Library/Developer/Xcode/Archives

Xcode Archives contain the signed .xcarchive bundles and dSYM debug symbols for releases you shipped to users or App Store Connect. Only remove old archives if you no longer need to symbolicate crash logs for those builds.

3. Scan All Developer Caches Together in MaXpert Care

Built in 100% native Swift by macOS engineers, MaXpert Care includes dedicated Developer Junk detection inside Smart Scan and Cleanup. It measures Xcode DerivedData, build caches and package-manager caches in seconds, lets you preview each folder’s exact footprint, and moves only what you approve to the Trash.

Frequently Asked Questions

Will deleting Xcode DerivedData break my git repository or Swift code?

Never. DerivedData only stores generated build intermediates, precompiled headers and autocomplete indexes outside your repository. Close Xcode first, move DerivedData to the Trash, and Xcode will regenerate a clean index on your next build.

Does MaXpert Care use Electron or background Node processes?

No. MaXpert Care is written in 100% native Swift and SwiftUI for macOS, so it stays tiny in memory and never competes with Xcode, Docker or your compiler for CPU cycles.

More macOS Guides

All guides