Xcode – delete from ~/Library/Developer/Xcode folder

xcodexcode7

My ~/Library/Developer/Xcode folder is over 17 gigs in size. As I work in virtual machine (Parallels 12) with a 64 gig limit in total virtual disk size, I need to recover some disk space.

Amongst the folders such as “Archives”, “DerivedDate”, “Installs”, “iOS Device Logs”, “iOS DeviceSupport”, “Snapshots”, and “UserData”, what might I be able to delete without ruining my project?

Best Answer

Under Archives you can delete anything you want but you should keep recent builds. And you should backup older builds you might need to access in the future.

You can delete everything under DerivedData. Next time you build a project, the needed files will be recreated.

My Installs folder only contains a set of empty folders and the newest if over 3 years old. Check yours, that may be safe to delete.

The iOS Device Logs folder contains old device logs for various versions of iOS. You can safely delete any of the older logs.

The iOS DeviceSupport folder contains a folder for each version of iOS you ever had on an iOS device you ever connected while Xcode was running. Feel free to delete any folders for versions of iOS you don't support anymore. For example, if none of your apps have a Deployment Target older than iOS 8.1, for example, you can safely delete any folder for iOS 8.0.x and earlier. These folders are only needed to symbolicate crash reports.

The Snapshots folder is used by Xcode to save snapshots (backups). You can delete snapshots for old projects you don't care about.

I'd leave the UserData folder alone.