Locate the data for the project you are working on

The default DerivedData location is ~/Library/Developer/Xcode/DerivedData. However, Xcode and a project or workspace can use a custom build location. Check the Locations settings and the project or workspace configuration rather than assuming the default path is in use.

Note the project name and location before deleting anything. Two checkouts with similar names can have different build data. If you are diagnosing a single project, begin with that project instead of clearing every cached build on the machine.

Separate derived output from source and archives

DerivedData contains generated build-related data. Your source repository, signing assets and archived release builds serve different purposes. Removing all of ~/Library/Developer/Xcode is not a targeted cache cleanup.

Keep archives that you need for distribution records or debugging, and preserve any irreplaceable files that you have manually stored in a generated folder. A folder normally used for derived output is not a guarantee that nobody has placed other material there.

Use a small, reversible cleanup first

Save your work and stop the active build. Locate the project-specific DerivedData directory, then close Xcode before removing that project’s generated data. A later build may take longer while Xcode reconstructs the files.

  1. Confirm the project and its configured DerivedData location.
  2. Stop builds and close Xcode.
  3. Review the specific project folder in Finder; keep source, archives and unrelated projects out of the selection.
  4. Move the selected generated data to the Trash.
  5. Reopen the project and build again, allowing time for rebuilding and indexing.
  6. Check the result before deciding whether any broader cleanup is useful.

If rebuilding does not fix the original issue

Read the new build error and compare it with the previous one. A dependency mismatch, an incorrect build setting or a signing error is not necessarily caused by cache files. Repeating the cleanup without a different result adds time but little diagnostic information.

For a storage problem, measure the size again after the rebuild. Frequently used build output returns, so deleting it may provide temporary space rather than a permanent reduction. Old projects that are no longer built may be better candidates for a periodic review.

Review developer files alongside other large files

Storage Cleaner: Disk & Cache can help inspect developer-file categories and large files in authorized folders. Scanning is free; cleaning requires a purchase. Keep the decision about project data, archives and backups under your control.

Use the scan to identify candidates, then verify their paths. For a single failing project, the targeted Xcode workflow above remains the clearest way to observe whether replacing derived output changes the result.

Sources and further reading