To clear the Xcode cache, quit Xcode and delete the contents of ~/Library/Developer/Xcode/DerivedData, which Apple says can be re-created at any time from your source files. Then delete old iOS version folders in iOS DeviceSupport, run xcrun simctl delete unavailable for leftover simulators, and remove simulator runtimes you don't test on in Xcode › Settings › Components. Keep your Archives: they are not a cache, and Xcode never rebuilds them.
Below, each part gets a short section: what it is, where it lives, whether Xcode makes it again, and how to clear it. Measure first with du -sh ~/Library/Developer/Xcode/* ~/Library/Developer/CoreSimulator/* in Terminal, so you know where the space really is.
xcrun simctl help in Xcode 27.2, linked at the bottom and checked on 24 November 2026. For Docker, Homebrew, npm and other tools, see our wider guide to clearing developer caches on a Mac.Xcode's folders at a glance
| What | Where | Rebuilt? | How to clear it |
|---|---|---|---|
| DerivedData | ~/Library/Developer/Xcode/DerivedData | Yes, on the next build | Quit Xcode, then rm -rf ~/Library/Developer/Xcode/DerivedData/* |
| iOS DeviceSupport | ~/Library/Developer/Xcode/iOS DeviceSupport (and watchOS, tvOS, visionOS versions) | Yes, when you connect that device again | Delete folders for iOS versions you no longer use |
| Simulator devices | ~/Library/Developer/CoreSimulator/Devices | No, but you can make new ones | xcrun simctl delete unavailable |
| Simulator runtimes | Managed by Xcode | Download again if needed | Xcode › Settings › Components, or xcrun simctl runtime delete |
| Archives (not a cache) | ~/Library/Developer/Xcode/Archives | No, never | Window › Organizer › Archives, for builds no one uses |
Before deleting anything in ~/Library/Developer, quit Xcode. An Apple engineer on the developer forums puts it plainly: make sure Xcode is quit before you delete files behind its back.
DerivedData
DerivedData is Xcode's build cache: compiled code, indexes and module caches for every project you open. Apple's Xcode Help says it "is often large and can be re-created at any time from your source files", so deleting it is safe. The cost is a slower first build and a fresh index for each project.
- Quit Xcode.
- In Terminal, run
rm -rf ~/Library/Developer/Xcode/DerivedData/*. Or, in Finder, choose Go › Go to Folder, paste~/Library/Developer/Xcode/DerivedData, select everything inside and move it to the Trash, then empty the Trash. - Open your project and build. Xcode makes what it needs again.
To clear only one project, delete just its folder: each is named after the project, followed by a string of letters. Xcode 27 also adds a Delete Derived Data menu item, which Apple's Xcode team was thanked for at WWDC26, so in newer versions you can do this without Terminal.
Xcode › Settings › Locations
Xcode › Settings › Locations is where Xcode decides where DerivedData and Archives go. If your DerivedData isn't in the default place, this pane shows the real path. Apple's Xcode Help says you can set Derived Data to Default, Relative or Custom, and set Archives to Default or Custom.
- Find the folder: open Xcode › Settings and click Locations. The Derived Data and Archives rows show where each one is.
- Move it to another disk: from the Derived Data pop-up menu, choose Custom, then click the folder icon and pick a folder, for example on an external SSD. Archives work the same way with the Archives pop-up menu.
- Go back: choose Default again, and the locations return to
~/Library/Developer/Xcode/DerivedDataand~/Library/Developer/Xcode/Archives.
Apple adds a warning for a Relative location: don't back up the derived data folder, send it to others or check it into source control. Moving DerivedData to an external disk only helps if that disk is plugged in whenever you build.
iOS DeviceSupport
iOS DeviceSupport holds operating system symbols that Xcode copies from each iPhone or iPad you connect, one folder per iOS version. You can delete folders for versions you no longer debug on. If you connect a device running that version again, Xcode copies the symbols back.
Apple's documentation explains what they are for: these symbols make Apple's own frameworks readable in a crash report, and they are specific to the operating system release and the device. Xcode saves them in ~/Library/Developer/Xcode/iOS DeviceSupport, with matching folders for watchOS, tvOS and visionOS. Every iOS version you debug on adds a folder, so they pile up as your devices update.
To clean up, open the folder in Finder, sort by name, and delete the folders for iOS versions none of your test devices run any more. Keep the ones for versions you still debug on, so Xcode doesn't need to copy them again.
Simulators and simulator runtimes
Run xcrun simctl delete unavailable to delete simulator devices "that are not supported by the current Xcode SDK", in the words of simctl's own help. Those are usually left behind by older Xcode versions. The bigger files are the simulator runtimes, whole copies of iOS for the simulator, which you remove in Xcode › Settings › Components.
Simulator devices
Each simulated iPhone or iPad keeps its own apps and data in ~/Library/Developer/CoreSimulator/Devices. The commands that matter:
xcrun simctl delete unavailableremoves simulators your Xcode can no longer run.xcrun simctl delete allremoves every simulator. Xcode can make new ones, but their apps and data are gone.xcrun simctl erase allwipes apps and data on every simulator but keeps the devices.
Don't empty the CoreSimulator folders in Finder. An Apple engineer on the developer forums advises managing them through Xcode or simctl instead.
Simulator runtimes
Apple's documentation says to choose Xcode › Settings and click Components. Xcode shows each installed runtime and how much storage you get back by removing it. Click the Info button next to a runtime you don't test on, then click Delete. You can download it again later from the same place.
In Terminal, xcrun simctl runtime list lists runtimes, and in Xcode 27 xcrun simctl runtime delete takes --unusable, --outdated (a newer version of the same runtime is installed) or --notUsedSinceDays 90. Add --dry-run first to see what it would delete.
Archives: the one not to clear
Xcode Archives are not a cache, and nothing rebuilds them. Each archive holds the built app and its dSYM files, the debug symbols that turn a crash report into readable function names. Apple says you must keep the Xcode archive for each build of your app you distribute, or you might not be able to diagnose crashes.
That still leaves room to tidy up. Archives you made for testing, or for versions nobody runs any more, can go. Open Window › Organizer, choose Archives, and delete the ones you don't need. To keep them without using the internal disk, change the Archives location in Xcode › Settings › Locations, or move older ones to another drive and keep them backed up. If you upload builds with their symbols to App Store Connect, Apple adds symbol names to the crash reports it sends you, but keeping the archive is still the safe choice.
What not to delete
- Archives for any version people still use.
- CoreSimulator folders, by hand in Finder. Use Xcode or
simctl. - Anything while Xcode is running.
- Your project folders. DerivedData holds only what Xcode makes from them.
A side note: if you'd rather not do this by hand, CloudRoomy's Free Up Space (we make it) finds Xcode DerivedData and device support, simulators not used in 60 days, and other developer caches. It lists each with its size and deletes nothing until you confirm. Xcode archives older than 14 days are moved to your CloudRoomy drive with a link left behind, rather than deleted. It needs a Mac with Apple silicon and macOS 26.2 or later, with a 30-day trial.
Questions people ask
Is it safe to delete DerivedData?
Yes. Apple's Xcode Help says the derived data folder is often large and can be re-created at any time from your source files. Quit Xcode first. The next build of each project is a full one, so it takes longer, and Xcode re-indexes your code.
Where is the DerivedData folder?
By default it is ~/Library/Developer/Xcode/DerivedData, for all your projects. If you or a team setting changed it, Xcode › Settings › Locations shows the real path next to Derived Data.
Can I delete Xcode Archives?
Only for builds nobody uses any more. Archives are not a cache: they hold the dSYM files that turn crash reports into readable code, and Apple says you must keep the archive for each build you distribute. Delete old ones in Window › Organizer › Archives, or move them to another disk.
Can I delete iOS DeviceSupport?
Yes, the folders for iOS versions you no longer debug on. They hold operating system symbols that Xcode copied from your devices, and Xcode copies them again the next time you connect a device running that version.
What does xcrun simctl delete unavailable do?
It deletes simulator devices that are not supported by the current Xcode SDK, usually left behind by older Xcode versions, along with their apps and data. Simulators your Xcode can still run are not touched. It doesn't remove simulator runtimes; do that in Xcode › Settings › Components.
Will deleting DerivedData delete my code?
No. DerivedData holds what Xcode makes from your source files, such as build products and indexes, and Apple says it can be re-created at any time from them. Your project folders are somewhere else and are not touched.
Sources, checked 24 November 2026: Apple, Xcode Help, Manage the locations of project-generated files in Xcode; Apple Developer Documentation, Downloading and installing additional Xcode components, Acquiring operating system symbol information, Building your app to include debugging information, Adding identifiable symbol names to a crash report and Distributing your app for beta testing and releases; Apple Developer Forums, Xcode using 90GB with ~/Library/Developer: what can I safely clean?; Apple, Xcode Tips and Tricks Group Lab, WWDC26; Apple, xcrun simctl help delete and xcrun simctl help runtime in Xcode 27.2.
Found a step that has changed? Write to hello@cloudroomy.app.