Where Does Xcode Keep DerivedData and Archives?
Where Xcode keeps DerivedData, Archives, DeviceSupport and simulator files, plus why deleting DerivedData is safe and how to relocate it.
Last updated
DerivedData is where Xcode parks the intermediate results of every build: object files, compiled products, indexes, logs and module caches. Each project gets its own hash-named subfolder, so an abandoned experiment can sit right next to the project you build every day.
None of it is source code. Xcode regenerates all of it on the next build, which is why deleting the folder is the standard fix for a stale index or a build error that makes no sense. The cost is time, since the first build afterwards has to compile everything from scratch.
Where Xcode stores this, by platform
~/Library/Developer/Xcode/DerivedData
Three sibling folders are worth knowing. Archives (~/Library/Developer/Xcode/Archives) holds .xcarchive bundles with the dSYMs you need to symbolicate crash logs, and Xcode cannot rebuild those. iOS DeviceSupport (~/Library/Developer/Xcode/iOS DeviceSupport) holds debug symbols downloaded when you connect a device, safe to clear for OS versions you no longer target. Simulator data lives under ~/Library/Developer/CoreSimulator. To relocate DerivedData, open Xcode > Settings > Locations and switch Derived Data to a custom folder; File > Project Settings > Project-relative Location puts build output next to the project instead of in DerivedData.
Frequently asked questions
is it safe to delete the deriveddata folder
Yes. DerivedData holds only build output, indexes and caches, so the next build just takes longer while Xcode regenerates everything. Quit Xcode first, then delete the folder. Archives are the exception, since those contain dSYMs that Xcode can never recreate.
where does xcode store archives
In ~/Library/Developer/Xcode/Archives, organised by date. Each .xcarchive holds the built app, its debug symbols and the metadata you need to symbolicate crashes. Open them from the Organizer window, and delete from there when you no longer need to ship or debug those builds.
how do i change the deriveddata location in xcode
Open Xcode > Settings > Locations and use the Derived Data dropdown to switch from Default to a custom folder, which Xcode offers to move existing data into. For output beside one project at a time, use File > Project Settings and pick Project-relative Location instead.
Notice an outdated path? Let us know.