System

Xcode DerivedData

Xcode stores per-project build products and intermediate compiler output in DerivedData, including indexed source metadata, Swift module caches, Clang PCM and precompiled header files, SourceKit indexes, asset compilation results, and simulator-ready app bundles. These files exist to speed up incremental builds, code completion, symbol lookup, previews, and debugging, but they can become inconsistent after branch switches, SDK updates, toolchain changes, or renamed targets. Kudu removes stale DerivedData so Xcode can regenerate clean build intermediates and indexes without touching your source code, project settings, signing identities, or accounts.

Why clean Xcode DerivedData?

  • Stale Swift module caches and Clang precompiled headers after an Xcode or SDK update cause mysterious compile errors like missing symbols or incompatible module versions until the project is rebuilt from clean intermediates
  • Outdated SourceKit and indexing data make code completion, jump-to-definition, and symbol search show wrong results or stop responding even though the project files are correct
  • Old build products from a renamed target or switched Git branch can make Xcode launch the wrong app binary, attach the debugger to an outdated executable, or report duplicate build artifacts
  • Corrupted intermediate object files and package build output lead to repeated build failures that disappear after deleting DerivedData and forcing a full recompilation
  • Accumulated simulator app bundles, dSYM files, asset compilation output, and test products in DerivedData consume tens of gigabytes, which users notice as low free space and longer Spotlight or backup activity
  • SwiftUI previews often fail with stale preview build artifacts, showing endless loading, canvas crashes, or 'cannot preview in this file' errors until preview-specific intermediates are regenerated
  • Fragmented index and build databases inside DerivedData can waste space and slow project analysis; rebuilding them effectively rewrites the data from scratch rather than preserving bloated old pages
What gets cleaned

Cache paths Kudu targets

macOS

~/Library/Developer/Xcode/DerivedData
Frequently asked

Common questions about Xcode DerivedData

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.