NythyCleaner
← Blog

How to Clean Xcode Caches on Mac (DerivedData, Archives, Simulators)

10 min read
#xcode#macos#developer#derived-data#cleanup

How to Clean Xcode Caches on Mac (DerivedData, Archives, Simulators)

If you build iOS or macOS apps, Xcode is one of the fastest ways to burn through disk space. DerivedData, Archives, simulators, and SwiftPM caches can grow to dozens of gigabytes without any warning in the Storage overview.

This guide explains what each folder does, what you can delete safely, and how to automate the cleanup. For a broader storage strategy, see how to free up disk space on Mac.

Why Xcode Uses So Much Space

Xcode stores several independent categories of data:

  • DerivedData — intermediate build products, indexes, and module caches. Safe to delete; Xcode will rebuild on the next compile.
  • Archives — release builds for App Store Connect and ad-hoc distribution. Old archives are often forgotten.
  • Simulators — full device runtime images. Removing unused runtimes recovers large amounts of space.
  • SwiftPM — checkouts and build artifacts under .build and SwiftPM caches.
  • Device support — symbols for connected iOS devices; older versions can be removed if you no longer test those OS versions.

None of these are “your source code.” They are reproducible artifacts, which is why deleting them is usually low risk.

Clean DerivedData Manually

  1. Quit Xcode.
  2. Open Finder and press Shift + Command + G.
  3. Paste: ~/Library/Developer/Xcode/DerivedData
  4. Delete the contents (or the whole folder). Xcode will recreate it.

Alternatively, in Xcode: Settings → Locations → Derived Data and click the arrow to open the folder in Finder.

Remove Old Archives

Archives live under:

~/Library/Developer/Xcode/Archives

Each dated folder is an Xcode archive. Delete archives for old versions you no longer need to ship or debug. Keep recent ones if you still symbolicate crash logs from those builds.

Trim Simulator Runtimes

  1. Open Xcode → Settings → Platforms (or Components on older Xcode).
  2. Remove iOS/watchOS/tvOS runtimes you no longer use.

You can also delete data under ~/Library/Developer/CoreSimulator — but prefer removing platforms via Xcode first to avoid breaking active projects.

SwiftPM and CocoaPods

  • SwiftPM: Checkouts under ~/Library/Caches/org.swift.swiftpm and project .build folders.
  • CocoaPods: Pods folder can be regenerated with pod install.

If you are unsure, keep a backup or use version control before deleting large folders inside a project.

Automate Xcode Cleanup with NythyCleaner

NythyCleaner includes a Developer / Xcode section that scans common developer paths, summarizes how much space each category uses, and lets you clean them in one workflow. You can pair it with:

  • Disk Space — treemap view to see where space goes beyond Xcode.
  • System cleanup — caches and logs that add up next to Xcode.

Safety Checklist

  • Close Xcode before deleting DerivedData or large simulator data.
  • Do not delete your ~/Developer or project folders unless you intend to.
  • Keep recent App Store archives if you still need to upload or debug matching builds.

Summary

LocationTypical contentsSafe to delete?
DerivedDataBuild outputs, indexesYes (rebuilds)
ArchivesIPA/IPA-related archivesYes, if obsolete
SimulatorsRuntime imagesYes, unused runtimes
SwiftPM cachesDependencies, buildsUsually yes

Cleaning Xcode caches regularly keeps SSDs fast and avoids surprise “disk full” errors during builds.