1. Decide whether cleanup solves your problem
A project you have stopped working on is a better storage candidate than the project you rebuild all day. Removing its generated data can recover working room, but opening it again will create new files. The next build and indexing pass may take longer. Keep the cache if that saved work is more useful than the space.
If your goal is to fix a build error, read the error first. Apple’s Xcode team recommends checking settings and trying a clean build folder before deleting Derived Data reflexively. A duplicate build input, missing dependency or signing error can survive cache removal unchanged.
2. Confirm the project’s Derived Data location
For Xcode versions with a Locations pane, open Xcode → Settings → Locations and inspect the Derived Data path. Older releases call Settings “Preferences.” A custom workspace or build configuration can use a different location, so do not assume the default folder accounts for everything.
The usual default is ~/Library/Developer/Xcode/DerivedData. In Finder, choose Go → Go to Folder and paste that path to inspect it. Match the project name to the folder you intend to review, then use Get Info to check its size. Do not treat every similarly named folder as part of the same project.
3. Measure the folder before removing anything
The Terminal command below only measures the usual Derived Data folder; it does not delete files or change Xcode settings. If you configured another location, use that path instead. A missing-folder error means this path is absent, not that Xcode uses no storage elsewhere.
In a read-only check on the Mac used for this guide on September 29, 2026, macOS du reported 4.5G for this folder (about 4.5GiB of allocated storage), with Xcode 27.0 installed. No files were removed. That is one machine’s current usage, not a typical size or a promise of recoverable space. Your total can change while builds are running.
Use Finder’s Get Info on the individual project folder next. The total for DerivedData does not tell you which project is inactive or whether anything inside needs to be kept. Do not widen the selection to the parent Xcode folder to chase a bigger number.
du -sh "$HOME/Library/Developer/Xcode/DerivedData"4. Remove a reviewed selection
Save your work and stop builds, tests and previews. Quit Xcode before manually moving a selected project’s generated folder to Trash. If you have several Xcode versions open, close the sessions that may use that location. Keep the selection narrow enough that you can explain what it belongs to.
Xcode 27 adds a Delete Derived Data menu action, confirmed in Apple’s WWDC26 Xcode lab. If your installed version offers it, review the action’s scope and confirmation. Its presence is version dependent; this guide does not assume all releases have the same menu or that the action uses Trash.
5. Keep source, archives and test state separate
Do not extend this cleanup to the whole Library/Developer directory. Your project repository, release archives, simulator devices and platform runtimes serve different purposes. A release archive may be needed for distribution or debugging; a simulator may contain a test database that is not in source control.
Keep the Xcode archive for each app build you distribute. Apple explains that an archive contains the built binaries and their matching dSYM files; those symbols help interpret crash reports from that exact build. Rebuilding the same source with different settings or another Xcode version does not guarantee matching symbols.
Generated does not always mean disposable. Apple’s DocC workflow, for example, produces a .doccarchive inside Derived Data for you to export. Before cleanup, preserve any output you still need to publish, manually changed dependency files or exports that exist only there. Keep the source repository in its own known location; deleting a reviewed Derived Data folder is not permission to delete the project.
6. Rebuild once and check available space
Reopen a project you still use and build it once. Confirm that its dependencies resolve and your expected work remains available. If you used Trash, review the removed contents before emptying it: the files still occupy space until permanent removal. Compare available storage after that step.
Avoid turning cleanup into an every-build ritual. If the folder immediately grows again, that is evidence of the project’s workload. Review inactive projects periodically, and investigate simulator runtimes separately when they are the larger contributor. ClearDisk can help inspect paths and sizes; deciding what development state to retain remains your choice.
Common questions
Is it safe to delete Xcode's Derived Data folder?
Usually, a reviewed project’s generated build products and indexes can be recreated. Save your work and stop Xcode first. Check for exports, documentation archives or manually changed files you still need, keep your source and release archives, and expect another build and indexing pass.
Where is Xcode's Derived Data folder located?
The usual default is ~/Library/Developer/Xcode/DerivedData, but you can confirm it in Xcode's Settings under Locations, since a custom workspace or build configuration can use a different location.
Will deleting Derived Data fix my Xcode build error?
Not necessarily. Apple's Xcode team recommends checking settings and trying a clean build folder first, since a duplicate build input, missing dependency or signing error can survive a Derived Data deletion unchanged.
Should I clear my whole Library/Developer folder to save space?
No. Review the Derived Data folder for a specific inactive project. Library/Developer also holds other development state, including archives and simulator data. Your source repository lives wherever you saved or cloned it; it is a separate item to preserve.
References & further reading
These guides combine the linked official guidance with ClearDisk’s documented behavior. Your files and app settings determine the right next step.