Mac storage basics · Programming languages and toolchains
How do I completely remove Xcode and the data it leaves behind?
Short answer: Remove unneeded simulators first, delete Xcode from Applications, then clear the build-data and device-support folders in your Library's Developer folder. Keep Archives if you publish apps.
Deleting Xcode from Applications removes the app but leaves its data in the Developer folder of your Library: build data, simulators, device support files and archives.
- Before deleting Xcode, remove simulators and platforms you don't need (Xcode's settings list installed platforms).
- Delete Xcode from Applications.
- In your Library's Developer folder, delete the build-data and device-support folders.
Keep Archives if you publish apps — they're needed to read crash reports from your releases. Details on each folder: DerivedData, archives.