DerivedData contains generated build products and indexes. It is a useful place to review when Xcode storage grows, but it is only one part of the picture. Treat simulator data, device symbols, and release archives as separate decisions.
Xcode's default DerivedData location is ~/Library/Developer/Xcode/DerivedData. Check Xcode → Settings → Locations if you have configured a different path.
Finish or stop running builds, and quit Xcode.
In Finder, press Command-Shift-G and open the DerivedData path.
Identify the folder for the project you want to rebuild. Confirm that you have not stored original work there.
Move that project's generated folder to the Trash. Reopen Xcode and build the project to regenerate its products and indexes.
Review the result before emptying the Trash.
A clean rebuild and renewed indexing are expected. You do not need to clear every project just because one project has stale generated data.
02 Manage simulator runtimes in Xcode
Open Xcode → Settings → Components. Review the installed platforms and remove only versions you no longer need for testing. Apple documents this as the supported way to remove optional components. Manage Xcode components.
A simulator device also has its own app data. Erasing a device removes that data, which may include a useful reproduction case or a local test database. Remove selected devices through Xcode's device management interface after reviewing them. Do not use a command that erases every simulator as a routine cleanup step.
03 Keep device symbols you still need
Device support data and symbols help Xcode work with physical devices and interpret crash reports. The exact files depend on the Xcode and operating system versions you use. Their age alone is not enough to decide they are obsolete.
If you investigate crashes from older releases, retain the matching symbols or confirm you can obtain them again. Apple's symbolication guide explains why the operating system version and architecture matter.
04 Preserve release archives and configuration
Archives in ~/Library/Developer/Xcode/Archives can include the exact binaries and debug symbols for a distributed build. Keep the releases you support and verify an archive backup before moving it off the Mac. Rebuilding source is not a substitute for retaining the matching release symbols.
Apple recommends retaining the archive before distributing an app in its crash-diagnosis workflow.
05 Measure before and after
Inspect the folder you are considering and note the volume's available space. After a reviewed removal and emptying the Trash, compare the same volume again. Shared APFS blocks and snapshots mean that a folder total may differ from the amount recovered.
Scan ~/Library/Developer with Delve to compare the folders in context. Drill into a large region, inspect the path, then use Xcode to manage runtimes and other components it owns.
For Docker, JavaScript projects, and package caches, continue with Mac storage for developers. The same principle applies: identify the data before selecting the cleanup action.
Common questions
Is DerivedData safe to delete?
It normally contains generated build products and indexes that Xcode recreates. Stop builds, quit Xcode, confirm the path, and remove only the project data you intend to regenerate.
Will deleting DerivedData delete my source code?
Source code normally lives in your project directory, separately from DerivedData. Check your actual paths and keep a backup, particularly if you have a custom build configuration.
Can I delete all Xcode archives?
Keep archives and matching debug symbols for releases you may need to debug or redistribute. Verify an archive backup before removing its local copy.
Why does Xcode storage grow again?
Building, indexing, installing runtimes, and creating new simulator data use storage again. A cleanup removes selected existing data; it does not stop those activities.