Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

~/Library/Developer/Xcode/iOS DeviceSupport/<iOS Version>/Symbols/System/Library consuming 14+GB of my Mac disk space

Tags:

xcode

macos

ios

I have entries in here ranging back to a large number of iOS versions (many GB are for old iOS 8 versions and there are many iOS 6 and 7 versions as well).

I don't expect to care about building apps in Xcode to support these iOS versions any more (maybe I will care about iOS 8.4 for a few more months), I might build an app for some of the older iOS versions on a whim, but certainly am happy to give up the ability to do so if I can reclaim 10 or so GB of my disk.

Does anyone know how safe it is to remove these directories? What of value can possibly be contained within them?

like image 324
Steven Lu Avatar asked Oct 24 '15 20:10

Steven Lu


People also ask

Can I delete library developer Xcode iOS DeviceSupport?

4 Answers. Show activity on this post. The ~/Library/Developer/Xcode/iOS DeviceSupport folder is basically only needed to symbolicate crash logs. You could completely purge the entire folder.

Can I delete iOS DeviceSupport folder?

Yes, Xcode keeps device support files for old devices and it's safe to delete them.

Why does Xcode take up so much storage?

And for each of those, it supports multiple versions. For each OS, it has simulator runtimes, libraries, compilers, and software development kits. It has a ton of data about declarations supported in each operating system. That's why it's so huge.

How much storage is needed for Xcode?

We start wondering: “so how much space would I need now?”. If you checkout the Mac App Store entry for Xcode, it states 11.7 GB size.


1 Answers

@StephenDarlington 's answer is very clear.

I also wanted to add a reference to (and a text mirror of) this helpful article that I found which goes into some more depth about some other similar directories.

The author updated the article for Xcode 7.0.1 in Oct 2015.

~/Library/Developer/Xcode/DerivedData

The Derived Data folder here contains all of your project’s intermediate build information, index and debug/release built targets. You will generally delete this data when you observe peculiar behaviour like improper indexing or slowness of Xcode. Deleting all folders(Not derived data folder itself) from derived data will just make all your projects to be recreated when you build again; rebuilding will be bit slower.

Tip: Open Window > Projects. Select the desired project and click the Delete button next to the Derived Data path.

~/Library/Developer/Xcode/Archives

All your targets are kept in archived form in Archives folder. Before you decide to delete contents of this folder, here is a warning - if you want to be able to debug deployed versions of your App, you shouldn’t delete the archives.

~/Library/Developer/Xcode/iOS DeviceSupport

iOS Device Support folder creates a subfolder with the device version as identifier when you attach the device. Most of the time it’s just old stuff. Keep the latest version and rest of them can be deleted (if you don’t have an app that runs on 5.1.1, there’s no reason to keep the 5.1.1 directory/directories). If you still have a device running a particular version, the directory will be recreated by Xcode when you attach the device. And, no, this has nothing to do with simulator.

Caution: You’ll want to be careful when removing files from inside /Library and /Users/<yourusername>/Library as deleting the wrong files can cause applications, and even the OS, to misbehave.

~/Library/Developer/CoreSimulator

Core Simulator folder is familiar for many Xcode users. It’s simulator’s territory; thats where it stores app data. It’s obvious that you can toss the older version simulator folder/folders if you no longer support your apps for those versions. And, it’s safer to use ‘Reset content and Settings’ option from menu to delete all of your app data in a Simulator.

Tip: [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; will print the full path to document directory folder.

Note: As we know, simulator location was moved from ~/Library/Application Support/iPhone Simulator since the Xcode 6. So, if you have not cleared out this directory, have a check.

~/Library/Caches/com.apple.dt.Xcode

Caches are always safe to delete since they will be recreated as necessary. This isn’t a directory, it’s a file of kind Xcode Project. Delete away!

~/Library/Application Support/MobileSync/Backup

Additionally, Apple iOS device automatically syncs specific files and settings to your Mac every time they are connected to your Mac machine. To be on safer side, it’s wise to use Devices pane of iTunes preferences to delete older backups; you should be retaining your most recent back-ups off course.

like image 130
Steven Lu Avatar answered Oct 17 '22 15:10

Steven Lu