Prune

How-to · macOS

Where does Xcode DerivedData go, and can I delete it?

DerivedData is build output and indexes, not your source. Deleting it is normal maintenance. Expect 10–30 GB on busy Macs.

Location

~/Library/Developer/Xcode/DerivedData
# also heavy:
~/Library/Developer/Xcode/iOS DeviceSupport

Clear it

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

Quit Xcode first. The next build is slower while caches regenerate. That is expected, not a broken project.

Simulators and runtimes

Simulators Xcode can no longer start (their iOS version is gone) still hold their disk images, and each downloaded simulator runtime is several GB. Remove them with Xcode’s own tool:

xcrun simctl delete unavailable
xcrun simctl runtime list
xcrun simctl runtime delete <runtime-id>

A deleted runtime can be downloaded again from Xcode’s Platforms settings when you need it.

iPhone and iPad files

Old device backups live in ~/Library/Application Support/MobileSync/Backup, iOS update files in ~/Library/iTunes, and full macOS installers in /Applications. Keep the newest backup of every device you still own. Prune marks it as the latest for that device and sends anything you remove to the Trash.

On Windows, Xcode does not apply. Prune clears Ollama, Hugging Face, npm and the rest of your developer caches there instead.

FAQ

Will deleting DerivedData break my Xcode project?

No. Xcode rebuilds DerivedData the next time you compile. Device support files may need a one-time re-download.

Where is DerivedData?

~/Library/Developer/Xcode/DerivedData on macOS.

Can I delete Xcode simulator runtimes?

Yes. Runtimes you do not test on can be removed with xcrun simctl runtime delete, and downloaded again from Xcode when needed. Simulators marked unavailable can go with xcrun simctl delete unavailable.

Related