Macaroom
Guides › Xcode DerivedData

Is it safe to delete Xcode DerivedData?

Yes. DerivedData is Xcode's build cache, and it's often tens of gigabytes. Here's what it is, how to clear it, and what else Xcode leaves behind.

What DerivedData is

Every time you build a project, Xcode writes intermediate build products, indexes and logs to ~/Library/Developer/Xcode/DerivedData, one folder per project. It's there to make the next build faster. Xcode never cleans up folders for projects you've stopped working on, so it grows forever.

Is it safe to delete?

Yes. Nothing in DerivedData is your source code or settings. If you delete it, Xcode recreates what it needs. The only cost is that the next build of each project takes longer, and indexing (autocomplete, jump to definition) catches up in the background.

Quit Xcode first, so it isn't writing to the folder while you delete it.

How to delete it

From Finder

From Terminal

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

This deletes permanently, with no Trash. Double-check the path before pressing Return.

Other Xcode storage worth checking

FolderWhat it isSafe to remove?
~/Library/Developer/Xcode/iOS DeviceSupportDebug symbols copied from each iOS version you've connected a device onYes for old iOS versions. They're copied again if you connect that version. Details
~/Library/Developer/CoreSimulatorSimulator devices and their dataUnavailable ones, yes: xcrun simctl delete unavailable. Details
~/Library/Developer/Xcode/ArchivesBuilds you archived for releaseCareful. Keep archives of shipped versions if you need their crash symbols.
~/Library/Caches/com.apple.dt.XcodeXcode's own cacheYes. It's rebuilt.

Other developer leftovers

The same idea applies to node_modules folders, Rust target folders, Python virtual environments and Gradle caches in projects you haven't touched in months. They're all rebuilt by one install or build command. Two other big ones on developer Macs: Docker's disk and local AI models.

See it on your own Mac

Macaroom scans your Mac, names what each chunk of storage is, and marks what's safe to clear. Anything you remove goes to the Trash, so you can put it back.

Get Macaroom