Developer cleanup

Xcode Taking Up Tens of Gigabytes? How to Clear DerivedData, Simulators, and Device Support

See where Xcode's storage goes, which DerivedData, simulator runtimes, devices, and device support files you can delete, and what you should keep.

Published 2026/10/29By WashBear Team

After a while of iOS or macOS development, you may notice that System Data, or the Developer category in Storage settings, keeps growing. The culprit is rarely the Xcode app itself. It is the data Xcode keeps generating as you work: build caches for every project, a simulator runtime for every OS version, and device support files for every physical device you have debugged on. That data is spread across several folders. Some of it only costs you a slower next build when deleted; some of it cannot be recovered. This guide explains what each piece is, how to clean it up by hand, and what WashBear can do for you.

See where the space goes

Most Xcode data lives under ~/Library/Developer, while simulator runtimes live in a system-level location. Start with two read-only commands:

# Size of each subfolder in the Xcode and simulator folders, smallest first
du -h -d 1 ~/Library/Developer/Xcode ~/Library/Developer/CoreSimulator 2>/dev/null | sort -h
# Installed simulator runtimes and the space they use
xcrun simctl runtime list

The usual heavyweights, relative to ~/Library/Developer:

LocationContentsAfter deletion
Xcode/DerivedDataBuild products, indexes, and logs for each projectThe next build and indexing pass are slower; rebuilt automatically
Xcode/iOS DeviceSupportSystem symbols for on-device debugging, one copy per OS versionPrepared again when you connect a device on that version
CoreSimulator/DevicesEach simulator and the apps and data installed in itThe simulator's data is gone
CoreSimulator/CachesShared caches generated by simulatorsThe first simulator launch is slower
Xcode/ArchivesBuilds you distributed, plus their debug symbols (dSYMs)You can no longer export that build or symbolicate its crash logs

Simulator runtimes are not in this folder, and a single one is often several gigabytes. Use xcrun simctl runtime list to see them.

What is safe to delete, and what needs a second thought

  • Safe to delete: DerivedData, CoreSimulator/Caches, and old device logs and documentation indexes. Xcode generates all of them and simply regenerates them later.
  • Delete selectively: simulator runtimes, device support files, and simulator devices. The question is whether you still need to run or debug on that OS version. If your app supports iOS 17 and later, keep an iOS 17 runtime; device support for a test phone you retired long ago can go.
  • Do not treat as cache: Archives holds builds you submitted or distributed, along with the dSYMs needed to symbolicate their crash logs. Your project folders, certificates, and provisioning profiles are off-limits too.

Clean up manually

Quit Xcode and Simulator first so files are not rewritten while you delete them. The rm -rf commands below delete immediately; nothing goes to the Trash.

DerivedData

Check Xcode → Settings → Locations to confirm that Derived Data uses the default location. If it points to a custom folder, use that path instead.

# Build cache size per project
du -h -d 1 ~/Library/Developer/Xcode/DerivedData | sort -h
# Delete all build caches; source code, certificates, and archives are untouched
rm -rf ~/Library/Developer/Xcode/DerivedData

To clear a single project, delete its ProjectName-<random characters> folder. If you only want to fix a misbehaving build, try Product → Clean Build Folder first; it touches far less.

Simulator devices and SwiftUI previews

# List every simulator and its UDID
xcrun simctl list devices
# Delete simulators whose runtime is no longer installed
xcrun simctl delete unavailable
# Delete one simulator, including its apps and data
xcrun simctl delete <UDID>
# Remove the simulators used by SwiftUI previews; they are recreated on the next preview
xcrun simctl --set previews delete all

delete unavailable only removes devices that have lost their runtime, so it is most useful right after you delete runtimes. You can also delete a single simulator from Window → Devices and Simulators.

Simulator runtimes

The most direct way is Xcode → Settings → Components: click the info button next to a version you no longer need, then click Delete. Apple describes this in Downloading and installing additional Xcode components. From the command line:

xcrun simctl runtime list
# Delete a runtime by the identifier shown in the list
xcrun simctl runtime delete <identifier>

Simulators for that OS version stop working until you download the runtime again from the same settings page.

Device support files

Whenever you debug on a device running an OS version Xcode has not seen before, it saves that version's symbols in iOS DeviceSupport (watchOS, tvOS, and visionOS each have their own folder). A single version can take several gigabytes.

du -h -d 1 "$HOME/Library/Developer/Xcode/iOS DeviceSupport" | sort -h

Delete the folders for versions you no longer use. If you connect a device on that version later, Xcode prepares the files again, and the first debug session takes a little longer.

Archives

Manage archives one at a time in the Archives section of Window → Organizer. Delete a build only when you are sure you will not distribute it again or need to analyze its crash logs.

Clean Xcode data with WashBear

Run a Standard Scan in Deep Cleanup, and Xcode content appears under Xcode data:

  • Xcode derived data: the entire DerivedData folder at its default location.
  • Xcode simulator cache: CoreSimulator caches and temporary files. Simulator devices, runtimes, and app data are kept.
  • Xcode documentation and device logs: documentation indexes and iOS or watchOS device logs older than 14 days.
  • Xcode DeviceSupport: listed per OS version, so you can select only the versions you no longer need.
  • Simulator runtimes: removed through Xcode's own simctl. Only runtimes the system marks as deletable are listed, and you can select them one by one.

Smart recommendation never preselects these items, so expand each one, check its locations and size, and select what you want. All of them require Xcode to be closed, and some also require Simulator to be closed. In Confirm cleanup, use Close running apps (optional) to let WashBear close them for you; save your work first.

A few related items live in other categories: Apple device support cache under Application caches, Old iPhone and iPad firmware downloads (firmware files older than seven days) under System caches, and Swift Package Manager cache and CocoaPods cache under User cache files. For the Pods and .build folders inside your projects, see cleaning build folders in old projects.

Note

WashBear does not delete Archives, simulator devices, or SwiftUI preview data, and it does not handle DerivedData at a custom location. Use the manual steps above for those. Cleanup deletes files directly instead of moving them to the Trash, and the result is recorded in Operation History.

To see how much space these folders take on your Mac, download WashBear and run Deep Cleanup; scanning alone never deletes anything. The demo below uses sample data, so its items, sizes, and selections are only illustrative.

Deep Cleanup

Macintosh HD32.76 GB available
Found 33 cleanable itemsestimated cleanable data79.3 GB
System caches
Selected / Found554 MB/ 554 MBSelect all
Old diagnostic logsLow riskOld diagnostic reports from macOS and apps 313 MB
Long-unused system cachesLow riskSystem caches not updated by you for over 7 days 241 MB
Old temporary filesLow riskTemporary files left behind by macOS and apps 394 KB
Selected items21Estimated release41.5 GB
Selection
Interactive demo · all data is simulated

Checklist

  1. Save your work and quit Xcode and Simulator.
  2. Clear DerivedData and the simulator cache freely.
  3. Keep runtimes and device support only for OS versions your projects still support.
  4. After deleting runtimes, run xcrun simctl delete unavailable once.
  5. Delete archives only in Organizer, one at a time.

FAQ

Does deleting DerivedData affect my source code or Git?

No. DerivedData only contains generated files. Your source code, Git history, certificates, and provisioning profiles live elsewhere. The cost is a slower next full build and indexing pass.

Why did it grow back so quickly?

That is expected. As long as you build projects and use simulators, Xcode regenerates this data. Rather than repeatedly wiping caches you actively use, periodically remove OS versions and old project data you no longer need.

What if I delete a runtime I still need?

Download it again in Xcode → Settings → Components; the only cost is download time. If your whole Mac is short on space, start with what to do when your Mac storage is full.

Related articles