Many of you are trying to do iOS development on a budget. I’ve mentioned it before: Macs are expensive. You may be trying to get by on a small SSD, or this is your main machine and Xcode is competing for space with, well, the rest of your (computing) life.
So you occasionally run your favorite disk usage tool, and you see something like this:
What the heck, Xcode? Gigabytes of space per iOS version?
I could be using that space for something useful. What is it for, and can I delete it?
The good news is, yes, you can delete those directories, with some caveats. But first, a little background so you know why they exist.
The reason those directories exist are that they are support files needed by Xcode support developer functionality with real devices connected to your Mac. They only appear when you connect an iOS device to your Mac, but because they include things like symbol tables for each iOS release so you can see iOS functions in crash logs, they are different for every version of iOS, including minor revs. And worse, they are never automatically deleted. Referencing the previous screenshot, working on iOS 10, there are still directories from iOS 7…
So what can you delete? It depends on how conservative you want to be about keeping old versions. I generally am not, so I delete everything but the most recent iOS version in
~/Library/Developer/Xcode/iOS DeviceSupport. If an old version ever does become necessary, it will simply be repopulated. If you want to be a little more conservative, you can keep all directories for the most recent iOS major version, or even go back to including the previous major version.
Remember, it will always be repopulated if you plug in a device, so there isn’t any harm in deleting something you need, other than a little additional time for it to repopulate.
When there’s gigabytes of space at stake, it’s a good idea to drop this into your regular Mac maintenance schedule.
Comments are closed.