Skip to content
← All guides

Developer junk

Xcode DerivedData: What's Safe to Delete

The MacZentra team · Updated Sep 30, 2026 · 5 min read

Xcode’s DerivedData folder is always safe to delete. It only holds build products, indexes and logs that Xcode regenerates on the next build. Quit Xcode, delete the folder, and the only cost is a slower first build. The bigger space savings are often in the folders next to it: device support files, old simulators and archives.

What’s in DerivedData?

Every project you open gets a subfolder in ~/Library/Developer/Xcode/DerivedData holding intermediate build files, compiled products, the source index that powers autocomplete, and build logs. Xcode never cleans up folders for projects you’ve stopped opening, so it grows for as long as you use Xcode. 10 to 30 GB is typical on an active Mac.

Three ways to clear DerivedData

1. From Xcode (one project)

Product → Clean Build Folder (⇧⌘K) removes the build products for the open project. It leaves the index and other projects’ folders alone.

2. In Finder (everything)

In Xcode, open Settings → Locations and click the small arrow next to the Derived Data path to reveal it in Finder. Quit Xcode, then move the folder’s contents to the Trash.

3. In Terminal

Terminal
# Quit Xcode first
du -sh ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Developer/Xcode/DerivedData/*

The other Xcode folders that fill a Mac

FolderWhat it holdsSafe to delete?
Xcode/DerivedDataBuild products, indexes, logsYes, always. Rebuilt on next build.
Xcode/iOS DeviceSupportDebug symbols for each iOS version of a device you’ve connected, often 2 to 5 GB eachYes for old versions. Xcode re-copies them when that device connects again.
CoreSimulator/DevicesEvery simulator you’ve created, with its installed apps and dataUnavailable ones, yes. Others lose their app data.
Xcode/ArchivesBuilds you archived for release, including the dSYMs used to read crash reportsOnly for builds you’ll never need to symbolicate or re-export.
Caches/com.apple.dt.XcodeXcode’s own cacheYes. Quit Xcode first.

All paths above are under ~/Library/Developer/ except the last, which is under ~/Library/.

How to clean up simulators

Simulators for iOS versions you no longer have installed stay on disk as “unavailable”. One command removes them all:

Terminal
xcrun simctl delete unavailable

Simulator runtimes (the downloadable iOS, watchOS and visionOS platforms) are the other big item, several gigabytes each. Remove the ones you don’t test against in Xcode’s Settings → Components (called Platforms in some versions), or from Terminal:

Terminal
xcrun simctl runtime list
xcrun simctl runtime delete <runtime-id>
MacZentra Developer Junk screen
Developer Junk lists Xcode DerivedData, archives and simulators with sizes.

Should I delete Xcode archives?

Keep archives for any build you’ve shipped and might still get crash reports from: they contain the dSYM files that turn crash logs into readable stack traces. If you upload symbols to your crash reporting service or App Store Connect, older archives are usually safe to remove. Manage them in Window → Organizer → Archives, where you can delete by date.

Will deleting these slow down Xcode?

Only once. After clearing DerivedData, the next build of each project is a full build and indexing runs again, which can take a few minutes on large projects. Device support files are re-copied the next time you connect that device, which shows up as “Preparing device for development”.

Xcode is rarely the only developer tool filling your disk. If you also use Docker or JavaScript tooling, see how to shrink Docker.raw and clear out old node_modules folders.

Everything MacZentra can clean

Treemap and Sunburst disk maps, a duplicate finder, Developer Junk, a complete app uninstaller and more, in one native storage cleaner for Mac that’s 15.4 MB.

Explore all features →