DiskwiseGet it for life$24

Free up the space Xcode takes

Last updated November 21, 2026

Xcode keeps build data for every project you open, simulators for every device you try, and support files for every iPhone and iOS version you build to, and it seldom deletes any of them. Here’s what each part is, which parts are safe to delete, and how.

Where the space goes

Nearly all of it is in ~/Library/Developer, a folder Finder hides. Here’s what’s inside, from the safest to delete to the ones to think about first.

  • Build data (DerivedData)Safe to clear
    ~/Library/Developer/Xcode/DerivedDataIndexes, build products and logs for every project you’ve opened. Xcode makes it again on the next build.
  • Simulator cachesSafe to clear
    ~/Library/Developer/CoreSimulator/CachesRebuilt when a simulator next starts.
  • iOS device support filesRebuildable
    ~/Library/Developer/Xcode/iOS DeviceSupportA folder for each iPhone model and iOS version you’ve built to. Xcode copies the one it needs again when that iPhone connects.
  • SimulatorsYour call
    ~/Library/Developer/CoreSimulator/DevicesEvery simulator, with the apps you ran on it and their data. Those for an iOS version you’ve removed can’t start, and are safe to delete.
  • ArchivesYour call
    ~/Library/Developer/Xcode/ArchivesEvery build you archived for TestFlight or the App Store, with the symbols that make its crash reports readable.

The groups are the ones Diskwise sorts these into: Safe to clear refills on its own, Rebuildable comes back with the next build or install, and Your call is yours to judge.

Simulator runtimes, the copies of iOS and Apple’s other systems that simulators run, live outside your home folder and are often the biggest of all. They have a section of their own below.

Clear DerivedData

DerivedData is safe to delete whenever Xcode isn’t building. Quit Xcode, then run:

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

Xcode makes the folder again, and the next build of each project takes longer, as it indexes and compiles everything from scratch. To clear one project’s build instead, choose Product > Clean Build Folder in Xcode, or press Shift-Command-K.

If you’ve moved DerivedData, Xcode > Settings > Locations shows where it is.

Delete simulators you don’t use

Each simulator keeps its own copy of the apps you’ve run on it, and their data. Those made for an iOS version you’ve since removed can’t start any more, and this deletes all of them at once:

Terminal
xcrun simctl delete unavailable

To see every simulator with its iOS version and ID, run xcrun simctl list devices. Delete one you no longer use with xcrun simctl delete followed by its ID, or in Xcode under Window > Devices and Simulators.

SwiftUI previews

Previews keep simulators of their own in ~/Library/Developer/Xcode/UserData/Previews, which the commands above leave alone. This deletes them, and Xcode makes new ones the next time a preview runs:

Terminal
xcrun simctl --set previews delete all

Remove runtimes you don’t build for

A runtime is the copy of iOS, watchOS, tvOS or visionOS that simulators run, and each takes several gigabytes. To remove one, open Xcode > Settings > Components, find it under Other Installed Platforms, click the info button beside it and click Delete.

From Terminal, this lists the runtimes with their identifiers:

Terminal
xcrun simctl runtime list

Then xcrun simctl runtime delete followed by an identifier removes that one. Keep the newest runtime of each platform you build for: Xcode needs the current one to build, though your apps still run on older ones.

Delete old iPhone support files

The first time you build to an iPhone on a new iOS version, Xcode copies support files for that version to your Mac, and it keeps every version it has copied. Each folder is named for the iPhone model and the iOS version, with its build number.

Xcode only uses the folder for the version each iPhone runs now. This opens them in Finder, so you can move the older ones to the Trash:

Terminal
open ~/Library/Developer/Xcode/iOS\ DeviceSupport

If you delete the current one too, Xcode copies it back the next time that iPhone connects, which takes a while.

Keep only the archives you need

Each time you archive a build for TestFlight or the App Store, Xcode keeps it, along with its debug symbols, the dSYM files that turn a crash report from that version into something you can read. Archives of versions nobody runs any more can go.

You can look through them in Xcode under Window > Organizer. To move the ones you don’t need to the Trash, this opens their folder in Finder:

Terminal
open ~/Library/Developer/Xcode/Archives

How Diskwise handles Xcode

Diskwise’s free scan finds everything in the list above and sorts it the same way. Build data and simulator caches are Safe to clear. Support files for iOS versions your iPhone has updated past, and simulators that can’t start, get Safe to clear rows of their own.

Archives and the simulators that still work are Your call: they stay unticked until you tick them, and they go to the Trash, not straight to deletion. Auto clean never touches build data while Xcode or a command-line build is running.

Rather not do it by hand?

Diskwise finds what fills your Mac, from build data to caches, sizes it honestly and clears what’s safe in one click. The scan is free.