How to clear Xcode cache on Mac, folder by folder.
Xcode spreads its storage across several folders, and DerivedData usually isn't the biggest. Here's each one, what it holds, and what happens when you delete it.
The short version
Quit Xcode, then move the folders inside ~/Library/Developer/Xcode/DerivedData to the Trash; Xcode rebuilds them on the next build. The bigger wins are usually simulator runtimes, which you delete in Xcode › Settings › Components or with xcrun simctl runtime delete, and folders in iOS DeviceSupport for devices you no longer plug in.
Xcode storage: where it goes
Here's every folder that grows as you use Xcode, measured on one developer Mac running Xcode 27 in October 2026:
| What | Default location | On one Mac |
|---|---|---|
| DerivedData | ~/Library/Developer/Xcode/DerivedData | 1.7 GB |
| Device support | ~/Library/Developer/Xcode/iOS DeviceSupport | 4.3 GB |
| Simulators and their apps | ~/Library/Developer/CoreSimulator/Devices | 10 GB, 22 simulators |
| Simulator runtimes | Managed by macOS; xcrun simctl runtime list | 15.7 GB, 2 iOS runtimes |
| Archives | ~/Library/Developer/Xcode/Archives | None |
DerivedData was the smallest of the big ones. That's typical: it gets the attention, but simulators and device support usually take more. Check yours with du -sh ~/Library/Developer/Xcode/* ~/Library/Developer/CoreSimulator.
How to delete DerivedData in Xcode
DerivedData holds build products, intermediate files, and the index Xcode uses for code completion and search, one folder per project. It's always safe to delete. Xcode rebuilds it, and the cost is one slow build and a few minutes of indexing.
- For one project: choose Product › Clean Build Folder, or press Shift-Command-K. That removes the project's build products, not its index.
- For everything: quit Xcode, open
~/Library/Developer/Xcode/DerivedDatain Finder with Go › Go to Folder, and move the folders inside it to the Trash. - To find the folder from Xcode: Xcode › Settings › Locations shows the DerivedData path, with an arrow that opens it in Finder.
Device support, simulators, and archives
- Device support. When you plug in an iPhone, Apple Watch, or Apple TV, Xcode copies debug symbols for its OS version into
iOS DeviceSupport(andwatchOS,tvOS, orvisionOS DeviceSupport). Each version is a few gigabytes, and old ones never leave. Delete folders for OS versions you no longer debug on; Xcode copies them again the next time that device connects. - Simulator runtimes. Each iOS runtime is several gigabytes, and Xcode keeps old ones after updates. Delete them in Xcode › Settings › Components, or in Terminal:
The last command removes simulators whose runtime is gone, which can't run anyway. Runtimes count toward System Data, not toward any folder you can see.xcrun simctl runtime list xcrun simctl runtime delete <identifier> xcrun simctl delete unavailable - Archives. Builds you archived for App Store or TestFlight, in Window › Organizer. They hold the symbols for reading crash reports from that release, so keep the ones for versions people still run.
Simulators also keep caches in ~/Library/Developer/CoreSimulator/Caches, which the Simulator rebuilds on its own. The simulators themselves, with every app you've installed on them, are in CoreSimulator/Devices; erase or delete ones you don't use from Xcode's Window › Devices and Simulators.
How big Xcode gets
Xcode itself is several gigabytes, and everything above comes on top. On the developer Mac measured here, the folders in the table added up to about 32 GB. A Mac that has followed iOS betas for a few years, with several devices plugged in, can easily pass 100 GB.
Build folders outside Xcode
Swift packages built from the command line keep their output in a .build folder beside Package.swift; swift package clean empties it, or delete the folder. Projects using CocoaPods have a Pods folder that pod install rebuilds. Packages Xcode resolves for an app project live in DerivedData, so clearing it clears them too.
For simulators in System Data, see how to clear System Data. Or browse every tool's cache, like Docker and Homebrew.
Disk Forecast finds this for you
Disk Forecast lists each Xcode folder on its own row. Under Cleanup › Safe to clear: Xcode DerivedData, Xcode device support (iOS, watchOS, tvOS, and visionOS), and Simulator caches. Under Worth a look: Xcode archives, unchecked. Swift .build folders and CocoaPods show up under the build folder rows. Simulators are in System Data › Simulators, with each runtime's size and a button that runs xcrun simctl runtime delete after you confirm. It's free.
Questions
How do I clear the Xcode cache?
Quit Xcode and move the folders inside ~/Library/Developer/Xcode/DerivedData to the Trash. For one project, choose Product › Clean Build Folder. To reclaim more, delete old simulator runtimes in Xcode › Settings › Components and old folders in iOS DeviceSupport.
Is it safe to delete DerivedData?
Yes. It holds build products and the index, and Xcode rebuilds both. The next build is slower and indexing runs again, but no source code or settings are affected.
Where is DerivedData on a Mac?
In ~/Library/Developer/Xcode/DerivedData by default. Xcode › Settings › Locations shows the current path and can open it in Finder.
Why does Xcode take so much storage?
Simulator runtimes and device support files add up: each iOS runtime and each device OS version is several gigabytes, and Xcode keeps old ones after updates. DerivedData and archives add more.
Can I delete iOS DeviceSupport folders?
Yes. They're debug symbols copied from devices you've connected. Xcode copies them again the next time you connect a device running that OS version.
Related guides
Know before it's full.
Free. No account, no subscription.
macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/diskforecast