Cleaner For Xcode Mac Cleaner For Xcode For Mac
We all know that Xcode has struggled with being a little on the portly side for some years, and even Apple acknowledged this back at WWDC 2012. Here’s what Matthew Firlik (Director of Development Technologies at Apple) had to say at the time:Last year at WWDC 2011 when we shipped Xcode 4.1 our download size was a little bit over 4 gigabytes, and I don't think there's anything more to be said about that. SPONSORED Build better iOS apps, faster. Looking for a great mobile CI/CD solution that has tons of iOS-specific tools, smooth code signing, and even real device testing?
Update: Our readers pointed out that Xcode 4.3 simplifies this process considerably by bundling Xcode into a single application. Therefore, this guide is most relevant to older versions. XCode 4.3 and later versions should be able to uninstall like any other Mac app, whereas older versions of XCode require the manual process outlined below.
Learn more about Bitrise’s iOS-specific solutions.But wait – there’s more!All this extra growth means that Xcode 9 is more than twice the size of Xcode 5, but even that’s not the whole story. You see, Xcode is a bit sneaky: the 10.41GB that Xcode 9 takes up is actually only its starting size.Each time you connect a device to your computer, you might have noticed Xcode likes to spend some time “Processing symbol files” or “Preparing debugger support” for that device. This happens once per iOS version, although it’s extremely fine-grained – even going from iOS 11 beta 9 to iOS 11 beta 10 will cause this process to repeat.What Xcode is doing is configuring its device support system so that it understands all the frameworks that ship inside the iOS version you connected, which in turn means it can symbolicate crash logs. This is no small amount of data – you can expect Xcode to chew up 2-3GB for each iOS version you connect.The problem is, Xcode doesn’t ever seem to want to remove device support once it’s installed, so if you’re an active iOS developer who doesn’t actively prune this yourself there’s a good chance you’ll find of device support data – most of which is for iOS versions that you don’t even think about any more.In my case, I recently finished writing, which meant I had installed iOS 11 betas 1 through 10 on my devices. If I hadn’t been cleaning Xcode’s device support directory, each of those combined would have been taking up a whopping 20GB of space, even though each beta version was effectively rendered obsolete as soon as its successor came out. Save 20GB with this one weird trickXcode’s initial install size is beyond our control, but its extended post-install growth is something you can reduce.
First, install the awesome tool, then point it at your /Library/Developer directory.This is where Xcode stores three chunky parts of its ecosystem:. The iOS Device Support directory stores debugging data for individual iOS versions. The Derived Data directory is the storage area Xcode uses while building your apps. The CoreSimulator directory is where Xcode’s simulator data lives, including all apps you’ve installed into simulators.Keep in mind that each of those simulators is feature complete, right down to those sample photos you see in the Photos app. If you’re curious, try searching /Library/Developer for “IMG0005.JPG” – I found 90 copies of the same photo.
1948 1954 chevrolet pickup vehicle specifications. Nice!When GrandPerspective finishes – and it might take some time – you’ll see something like the image below:GrandPerspective shows you the total space taken up by the scanned directory in the bottom-left corner (20.7GB for me), but you can also hover over individual files to see what they are and how much they take up.To make things easier to read I’ve added some annotations to mine so you can get an idea of where all the space goes:OK, so maybe I’ve been a touch facetious, but the point is that the majority of the files you can see in my developer directory aren’t needed.
If you want to reclaim tens of gigabytes of your storage used for various Xcode caches - this tool is for you!Xcode could store tens of gigabytes in /Library/Developer folder. Most of those cached files & symbols are not reclaimed over time and could consume a large amount of your storage, which is especially important if you have relatively small SSD drive.DevCleaner gives you an easy way to inspect auto-generated files and clean them if necessary. It could also remind you about scan after a while.It includes command line tool that allows you to include cleaning in your scripts.