Xcode storage guide

How to clean Xcode DerivedData safely.

DerivedData is usually rebuildable, but deleting every Xcode-related folder is not the same thing. Separate temporary build products from release archives, simulator data, and physical-device symbols before reclaiming space.

Usually rebuildableBuild products, indexes, logs, and package artifacts in DerivedData.
Review separatelyArchives may contain release binaries and dSYM files.
Expect a costThe next build and index can take longer after cleanup.

What DerivedData contains

Xcode creates a DerivedData directory for build products, intermediate files, indexes, logs, Swift package artifacts, and other generated development data. Removing a project’s DerivedData does not remove the project’s source repository, but Xcode must regenerate the deleted artifacts the next time you build or index that project.

Good candidate: an old project-specific DerivedData folder whose source repository is inactive and whose contents can be rebuilt by Xcode.

What not to treat as DerivedData

Archives

An .xcarchive can contain an archived app, symbol information, and distribution history. Apple documents that Xcode gathers binaries and dSYM files into an archive. Keep archives you may need for symbolication, re-export, or release records.

DeviceSupport

Physical-device support files help Xcode work with specific OS versions and debug symbols. They may be downloadable or regenerated later, but removal can interrupt work with older devices. Review the OS version and current device needs first.

Simulator runtimes and devices

A simulator device, its data, and the runtime it depends on are different resources. Remove unavailable or unused devices through Xcode or simctl; do not assume every CoreSimulator directory is disposable.

A safe decision sequence

  1. Quit active builds and verify the project is not currently compiling or indexing.
  2. Identify the exact DerivedData child rather than selecting the entire Developer directory.
  3. Check project activity and size. Recent projects are valid but may be costly to rebuild.
  4. Keep Archives, DeviceSupport, and simulator resources outside the same bulk action.
  5. Prefer a reversible quarantine when you have enough free space; quarantine itself does not reclaim capacity.

SpaceLint applies exact Xcode-path rules, labels DerivedData as rebuildable, reports recent activity, and keeps Archives and protected DeviceSupport in separate categories so one cleanup decision does not silently expand into another.

Frequently asked questions

Is it safe to delete Xcode DerivedData?

Usually, because DerivedData is generated and does not contain project source code. Expect Xcode to rebuild and reindex what you remove.

Where is Xcode DerivedData stored?

The default location is ~/Library/Developer/Xcode/DerivedData. Confirm Xcode is not configured to use a custom location before cleanup.

Does deleting DerivedData delete Archives?

No when you remove only DerivedData. Archives are separate and can contain release binaries and dSYM files worth keeping.

What happens after deleting DerivedData?

The next build and index can take longer while Xcode recreates build products, indexes, logs, and package artifacts.

Official references

Review Xcode storage before deleting it.

SpaceLint shows exact paths, size, activity, impact, risk, and recovery options before cleanup.