How to clear Xcode cache on Mac
It’s safe to clear Xcode cache on a Mac: DerivedData, old simulators and device support files build up as you work, and Xcode creates again what it needs. Together they often take tens of gigabytes, and your projects and source code are not among them. Here is what each part is, what is safe to remove and what to keep, such as the archives of builds people still use.

- Open MacWashing and choose System Junk in the sidebar.
- Click Start Scan.
- Look through what it found and click Clean. Anything debatable stays unchecked.
Free trial · macOS 14 or later
What takes space in Xcode
- DerivedData: build products, indexes and intermediate files of every project you opened. Xcode rebuilds them.
- Simulators: each simulated device keeps the apps and data you installed in it.
- Simulator runtimes: one per platform and OS version, several gigabytes each.
- Device support files: symbol files Xcode copies from an iPhone or iPad you connect, one folder per iOS version.
- Archives: builds of your apps that you shipped or exported, with the symbol files (dSYMs) needed to read their crash reports. These are worth keeping.
Clean the build folder of one project
- Open the project in Xcode.
- Choose Product › Clean Build Folder (Shift-Command-K).
This removes the build products and intermediate files Xcode created for that project. The next build is a full one and takes longer. Clean Build Folder is also the first thing to try when a build fails for no clear reason.
How to delete DerivedData in Xcode
- In Xcode, choose Xcode › Settings and click Locations.
- Next to the Derived Data path, click the arrow: Finder opens the folder, by default
~/Library/Developer/Xcode/DerivedData.

- Quit Xcode.
- Move the folders inside DerivedData to the Trash: all of them, or only those named after projects you no longer work on.

- Empty the Trash.
Your projects and source code are not in DerivedData. Xcode indexes and builds a project again the next time you open it, which takes a while on big projects.
Remove old simulators and runtimes
After an Xcode update, simulators of OS versions that are no longer installed stay on disk. This command deletes every simulator whose runtime is gone, with the apps and data inside it:
xcrun simctl delete unavailableRuntimes take the most space. Remove those you don’t test on:
- Choose Xcode › Settings and click Components. Xcode shows how much space you get back by removing each component.
- Under Other Installed Platforms, click the information button next to a runtime you don’t need.

- Click Delete.
Device support files and Archives
Device support files live in ~/Library/Developer/Xcode/iOS DeviceSupport, a folder per iOS version. Delete the folders of versions you no longer test on: when you connect a device with that version again, Xcode copies the files back, which takes a few minutes.
Archives are in ~/Library/Developer/Xcode/Archives, and Xcode lists them in Window › Organizer. Delete only the builds of versions nobody uses anymore: without an archive you can’t read the crash reports of that build.
If you don’t develop apps anymore, see how to uninstall Xcode.
With MacWashing, it’s one click

System Junk in MacWashing has an Xcode Junk group: DerivedData, device support files, previews, simulator caches and simulators whose runtime is gone. Archives are listed unchecked, because they are builds of your apps.
Free trial · macOS 14 or later
Questions and answers
Will MacWashing delete my own files when it cleans?
No. It removes only what it can match to a known app or a known kind of junk, in places apps leave files; macOS and Apple’s files are never touched. Anything debatable is marked and stays unchecked until you decide.
What about apps that are open?
If an open app holds files being cleaned, MacWashing waits for it to quit or quits it at your request, and opens it again afterwards.
Is it free?
Yes, within the free trial: System Junk and the Uninstaller free up to 25 GB in total, with no account or card needed.
Is it safe to delete DerivedData in Xcode?
Yes. It holds build products and indexes that Xcode creates again. Quit Xcode first. The next build of each project takes longer.
Will clearing Xcode cache delete my projects?
No. Projects stay where you saved them. Only Archives hold your own builds, so delete them on purpose, not along with the cache.
Why does Xcode take so much space again?
Every build adds to DerivedData, every Xcode update can bring new runtimes, and every connected device with a new iOS version adds device support files. Clean up after major updates or when space runs low.