Xcode · Mac
How to clear Xcode DerivedData safely
Updated 2026-10-03 · By Syntic Care Team · Reviewed by Diana · Director
Short answer
You can delete the contents of DerivedData: it holds rebuildable build products, intermediate files, indexes and logs. Quit Xcode, then in Finder choose Go › Go to Folder… and open ~/Library/Developer/Xcode/DerivedData. Move the contents to the Trash and empty it once you have checked the selection. Xcode recreates what it needs the next time you build, so the first build and indexing will take longer. Your source code is not stored in DerivedData.
What DerivedData is and why it gets so big
Each time Xcode builds a project, it writes its working files to a folder called DerivedData, with one subfolder per project. Those subfolders hold:
- Build products and intermediate files for each scheme, configuration and destination you have built.
- The index that powers code completion, navigation and search.
- Logs from builds and tests.
- Swift package checkouts and module caches for the packages and modules your projects use.
None of this is your source code. It's there so the next build can reuse earlier work instead of starting from scratch. Folders for projects you opened once, branches you switched between, and builds made with older Xcode versions stay until you remove them, which is why DerivedData can become one of the largest folders in your Library.
People also clear DerivedData to fix stale builds: errors that point at code you've already changed, broken indexing, or previews that won't refresh.
On macOS Sequoia, Storage settings can show a Developer category, which macOS describes as project build caches and unused SDKs. Deleting from Storage settings is immediate and can't be undone, which is one reason the Finder route below is preferable.
How to clear DerivedData
These steps match Xcode 26. In older versions of Xcode, Settings was called Preferences.
Option 1: Clear all DerivedData through Finder
- Quit Xcode so it is not writing to DerivedData while you clear it.
- In Finder, choose Go › Go to Folder…, enter
~/Library/Developer/Xcode/DerivedData, and press Return. This is the default location. If you deliberately configured a custom DerivedData location, use that location instead. - Select the contents of the DerivedData folder and choose File › Move to Trash. Leave the DerivedData folder itself in place.
- Check that you selected the intended items, then empty the Trash.
- Reopen your project and build. The first build and indexing will be slower than usual.
Using Finder instead of a Terminal deletion command means anything you remove by mistake is still in the Trash until you empty it.
Option 2: Clean one project only
If only one project is misbehaving, open it and choose Product › Clean Build Folder… (Shift-Command-K). Xcode describes this command as removing build products and intermediate files. It leaves other projects alone.
Next: other Xcode data, with more care
DerivedData is usually the easiest place to recover space. Xcode keeps other large data that needs a judgement call:
- Simulator runtimes and platform support. Choose Xcode › Settings…, then click Components. Xcode lists installed Platform Support, Other Components and Other Installed Platforms (simulator runtimes), with the storage you can recover by removing them. To remove one, click the Info button next to it, then click Delete or Turn Off.
- Archives. Choose Window › Organizer (Option-Shift-Command-O) and select Archives. Each archive is a build you made for distribution. Xcode stores the app's binaries and debug symbol (dSYM) files inside the archive, and those symbols are what turn crash reports into readable function names and line numbers. To remove an archive, Control-click it and choose Move to Trash….
- Device support files. When you debug on a physical device, Xcode keeps support files in folders named after the platform, such as
~/Library/Developer/Xcode/iOS DeviceSupport, with one subfolder per OS version.
What's safe, and what's a judgement call
- DerivedData is safe to clear. Xcode recreates it. The cost is time: a full rebuild and a fresh index.
- Make sure you're in the right folder. Clear only the contents of DerivedData. Don't delete
~/Library/Developer/Xcodeas a whole, or any folder inside your project unless you know what it is. - Keep archives for builds you've distributed. Apple says you must retain the Xcode archive for each build of your app that you distribute, because without it you might not be able to diagnose problems from crash reports. Archives for builds that were never distributed are a judgement call.
- Simulator runtimes are a judgement call. Before you delete a runtime, make sure you no longer need the simulators that use it, or the apps and test data installed in them.
- Device support folders are a judgement call. Keep the folders for OS versions you still debug on.
- Back up your projects first. Make sure your work is committed or backed up before any cleanup session.
If Xcode isn't the main reason your disk is full, see why System Data is so large.
The Syntic Care method
Syntic Care shows how much space Xcode's DerivedData is using and explains what it is, so you can decide when to clear it in Xcode or Finder. Syntic Care does not delete it for you.
Syntic Care for Mac version 1 shows and explains what it finds. Actions that would change your Mac are not available yet.
Related guides
- Mac · TroubleshootingWhy is System Data so large on my Mac?What macOS counts as System Data, what usually makes it large, and how to investigate it safely with the tools built into your Mac.
- Mac · Troubleshooting"Your startup disk is almost full": how to free up space on a MacWhat the startup disk warning means, the order to check things in, and how to get space back safely with the tools built into macOS.