# Can you delete Xcode DerivedData, Archives and old simulators?

URL: https://www.kemptdesk.com/guides/xcode-derived-data-simulators
Platform: Mac
Applies to: Xcode 14 and later (Settings steps checked against current Xcode docs)
Reviewed: 2026-11-23
Publisher: KemptDesk (https://www.kemptdesk.com), a disk clean-up app for Mac and PC

Yes, you can delete `~/Library/Developer/Xcode/DerivedData` at any time: Xcode rebuilds it on the next build. Old folders in iOS DeviceSupport are also safe to remove. Keep your Archives, because they hold the dSYM files that symbolicate crash reports. Remove simulator runtimes in Xcode > Settings > Components, not in Finder.

## Where Xcode keeps its data

Xcode keeps almost everything in your user Library, which Finder hides. In Finder, choose Go > Go to Folder (Shift-Command-G) and paste a path. Xcode data is often one of the biggest items in [what fills a Mac and what is safe to delete](https://www.kemptdesk.com/guides/mac-storage-full).

- Build data and indexes: `~/Library/Developer/Xcode/DerivedData`
- App archives: `~/Library/Developer/Xcode/Archives`
- Device symbols: `~/Library/Developer/Xcode/iOS DeviceSupport` (also `watchOS DeviceSupport`, `tvOS DeviceSupport` and `visionOS DeviceSupport`)
- Simulated devices and their apps: `~/Library/Developer/CoreSimulator/Devices`
- Simulator caches: `~/Library/Developer/CoreSimulator/Caches`
- Documentation cache: `~/Library/Developer/Xcode/DocumentationCache`
- Simulator runtimes: system storage that macOS protects, mounted under `/Library/Developer/CoreSimulator/Volumes`

Apple's Xcode help says derived data holds "project indexes, logs, and build products" and that it "can be re-created at any time from your source files". You can move it in Xcode > Settings > Locations.

For npm, Cargo and Gradle downloads, see [which developer caches are safe to delete](https://www.kemptdesk.com/guides/developer-caches-node-modules-npm-cargo-gradle).

## Which Xcode folders are safe to delete

| Path | What it is | Safe to delete | What happens if you delete it | How to clean it |
| --- | --- | --- | --- | --- |
| `~/Library/Developer/Xcode/DerivedData` | Build products, indexes and logs for each project | Yes | The next build is a full build and Xcode indexes the project again | Quit Xcode, then delete the folder or its project subfolders |
| `~/Library/Developer/Xcode/iOS DeviceSupport` | System symbols copied from each device you connect | Yes | Xcode copies the symbols again the next time you connect that device | Delete the folders for OS versions you no longer debug |
| `~/Library/Developer/Xcode/Archives` | Archived builds, each with its app binary and dSYM files | Careful | You can lose the symbols for a build you shipped, so its crash reports stay unreadable | Delete only archives of builds you never distributed, in the Organizer |
| `~/Library/Developer/CoreSimulator/Devices` | Each simulated device, with the apps and data in it | Careful | Apps, test data and settings inside those simulators are lost | `xcrun simctl delete unavailable`, or remove simulators in Xcode |
| `~/Library/Developer/CoreSimulator/Caches` | Caches the Simulator builds for its runtimes | Yes | The Simulator rebuilds them; the first boot is slower | Quit Xcode and Simulator, then delete the contents |
| `~/Library/Developer/Xcode/DocumentationCache` | Downloaded developer documentation | Yes | Xcode rebuilds it when you open the documentation | Quit Xcode, then delete it together with `DocumentationIndex` |
| `/Library/Developer/CoreSimulator/Volumes` | Mounted simulator runtimes (whole iOS, watchOS, tvOS or visionOS systems) | No | Not possible by hand; the storage is protected by System Integrity Protection | Xcode > Settings > Components, or `xcrun simctl runtime delete` |

> **Careful:** Apple says: "You must retain the Xcode archive for each build of your app you distribute." Without it, you might not be able to diagnose a crash report from that build.

## How to clean Xcode data by hand

Quit Xcode and the Simulator app first. An Apple engineer gives the same advice: do not delete files "behind its back" while Xcode runs.

### Remove DerivedData

1. Open Xcode > Settings and click Locations.
2. Click the small arrow next to the Derived Data path. Finder opens the folder.
3. Quit Xcode.
4. Move the whole `DerivedData` folder, or only the subfolders of old projects, to the Trash.

To do the same in Terminal, run this command. It permanently deletes all build data for all projects:

```zsh
rm -rf ~/Library/Developer/Xcode/DerivedData
```

> **Tip:** Product > Clean Build Folder (Shift-Command-K) cleans only the current project. Deleting DerivedData clears every project at once, including projects you deleted long ago.

### Remove old device symbols

1. In Finder, open `~/Library/Developer/Xcode/iOS DeviceSupport`.
2. Look at the folder names. Each starts with an OS version and a build number.
3. Delete the folders of versions that no device on your desk still runs.
4. Repeat in the watchOS, tvOS and visionOS DeviceSupport folders if you have them.

Apple says the symbols are "specific to the operating system release, and the model and the CPU architecture of the device". After every OS update on your iPhone, Xcode copies a new set, so old sets pile up.

### Remove simulators and runtimes

First, delete simulated devices whose runtime is no longer installed. This command deletes those devices and the apps and data inside them:

```zsh
xcrun simctl delete unavailable
```

Then remove runtimes you do not need:

1. Open Xcode > Settings and click Components.
2. Under Other Installed Platforms, find the runtimes you no longer test on. Xcode shows how much storage each one uses.
3. Click the information button next to a runtime.
4. Click Delete.

Or use Terminal. The first command lists the installed runtimes with their identifiers. The second deletes one runtime:

```zsh
xcrun simctl runtime list
xcrun simctl runtime delete <identifier>
```

If a runtime stays in the "Deleting" state or comes back, Apple's support team treats it as a bug: report it with Feedback Assistant. Do not try `sudo rm` on runtime files. The storage is protected by System Integrity Protection, so the command fails.

### Remove old archives

1. In Xcode, choose Window > Organizer and click Archives.
2. Select an archive of a build you never sent to TestFlight, the App Store or a customer.
3. Control-click it and choose Delete.

Keep every archive of a build that people use. If you need the space, first copy those archives to an external disk.

## How KemptDesk handles this

The System Junk page has an **Xcode junk** category: `DerivedData`, `iOS DeviceSupport` and `CoreSimulator/Caches`. It is off by default; tick it to include it. These are caches, so KemptDesk deletes them directly.

Hidden space lists each folder under `~/Library/Developer` with a colour.

DerivedData, iOS DeviceSupport and simulator caches are **Safe to clean** (green), but KemptDesk does not select them for you: Smart Care's Clean recommended leaves developer caches out, as System Junk does. Select them in Hidden space or tick Xcode junk. Simulated devices show in green with the note "Safe if you do not build iOS apps". Archives are **Check first** (amber).

KemptDesk does not run `simctl` and does not delete simulator runtimes. Runtimes outside your home folder are **Protected**.

## Questions

### Is it safe to delete DerivedData?

Yes. It holds build products, indexes and logs that Xcode can re-create from your source files. The only cost is a slower first build and a new index for each project.

### Why does iOS DeviceSupport take so much space?

Xcode copies a set of system symbols from each device you connect, one set per OS version. After many iOS updates, the old sets stay on your Mac until you delete them.

### Can I delete the Archives folder?

Only archives of builds you never shipped. Each archive holds the dSYM files for its build, and Apple says you must keep the archive of every build you distribute to read its crash reports.

### How do I remove old simulator runtimes?

Use Xcode > Settings > Components, click the information button next to a runtime, and click Delete. In Terminal, `xcrun simctl runtime list` shows the identifiers and `xcrun simctl runtime delete` removes one.

### Why do deleted runtimes still use disk space?

Some developers report runtimes that stay in protected system storage after deletion. Apple's support team treats this as a bug and asks for a Feedback Assistant report. Do not disable System Integrity Protection to delete the files.

## Sources

- [Downloading and installing additional Xcode components (Apple Developer)](https://developer.apple.com/documentation/xcode/downloading-and-installing-additional-xcode-components)
- [Building your app to include debugging information (Apple Developer)](https://developer.apple.com/documentation/xcode/building-your-app-to-include-debugging-information)
- [Acquiring operating system symbol information (Apple Developer)](https://developer.apple.com/documentation/xcode/acquiring-operating-system-symbol-information)
- [Adding identifiable symbol names to a crash report (Apple Developer)](https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report)
- [Distributing your app for beta testing and releases (Apple Developer)](https://developer.apple.com/documentation/xcode/distributing-your-app-for-beta-testing-and-releases)
- [Xcode 14 Release Notes: simulator runtime disk images and simctl runtime (Apple Developer)](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes)
- [Xcode Help: Locations settings (Apple)](https://help.apple.com/xcode/mac/current/en.lproj/deva52afe8a4.html)
- [Xcode using 90 GB with ~/Library/Developer: answer from Apple Developer Technical Support (Apple Developer Forums)](https://developer.apple.com/forums/thread/812408)
- [Orphaned simulator runtime in protected storage (Apple Developer Forums)](https://developer.apple.com/forums/thread/812992)
- [How to delete iOS simulator runtimes? (Apple Developer Forums)](https://developer.apple.com/forums/thread/810415)
- [Failing to permanently delete old simulator volumes (Apple Developer Forums)](https://developer.apple.com/forums/thread/837906)
- [Issue with CoreSimulator cache consuming disk space (Apple Developer Forums)](https://developer.apple.com/forums/thread/758703)
