All Posts by Date or last 15, 30, 90 or 180 days.
also by Lloyd: diglloyd.com photography and WindInMyFace.com
Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Upgrade the memory of your 2019 iMac up to 128GB

Saving up to 8.5GB of Space After Every Apple Xcode Update

See my Mac wish list at B&H Photo.

8.87GB of XCode platforms (default install)

As a developer, I 'enjoy' frequent Apple XCode updates—roughly a 5GB download of which 90% is nothing I ever use (iOS and Apple TV and WatchOS platforms); I need Xcode support only for macOS development (the latest 'upgrade' crashes 100% of the time building diglloydTools...sigh). Yet the XCode updater insists on downloading and installing all development platforms, even for minor updates.

I wouldn’t care if the space used weren’t so substantial, but anyone with a 128GB or 256GB or 512GB SSD might care, as I do.

In my travel laptop I currently have only a 512GB flash drive (which is really only 500GB). Because of fixed requirements (stuff I absolutely must have onboard), my typical free space is only around 180GB. Space has gotten so tight on some photography trips* that I have been forced into external overflow storage which I greatly prefer to avoid as it greatly complicates working and backing up in the field, and is physically awkward in a car, more devices to carry, etc).

As shown at right, the Xcode Platforms folder uses 8.87 GB of space, of which about 8.5GB are platform support folders that I never use. That represents nearly 5% of the available free space on my laptop, so it makes sense to reclaim it.

Here’s how I reclaim the space after XCode is updated by removing unused platform support folders. Commands are shown in blue, as used in Terminal.

diglloydMP:MPG lloyd$ cd /Applications/Xcode.app/Contents/Developer/Platforms/
diglloydMP:Platforms lloyd$ sudo rm -rf AppleTV* Watch* iPhone*

After the above removal, the Platforms folder now occupies only 0.41GB instead of 8.87GB, a savings of 8.46GB. Want more?

# OPTIONAL: save another half-gigabyte if not using SWIFT:
diglloydMP:Developer lloyd$ sudo rm -rf /Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain
# OPTIONAL: save another 3.1GB by removing (not always this large, but can be)
diglloydMP:~ lloyd$ rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/
# OPTIONAL: remove support for iPhone/iPad/etc simulators (up to another gigabyte or so)
diglloydMP:~ lloyd$ rm -rf ~/Library/Developer/CoreSimulator/Devices/*

That’s a total savings of 12GB! It speaks to incoherent software management that Apple pushes complex (and potentially dangerous) cloud-based solutions for saving space in macOS Sierra without first eliminating the brain-dead space-wasting XCode behavior. The solution is obvious: install an inner core Xcode, then allow the user to add on whatever platforms and support are wanted. Don’t just shovel out unwanted bloatware.

Obviously one must not remove platform support needed for code development for that platform. But if like me you develop for only one or two of the platforms, space can be reclaimed. There aren’t that many “free lunches” for getting back that much space.

The 2016 MacBook Pro I’ve ordered with the 2TB SSD—I’m not going to make the same mistake twice (going with too small an SSD). Update: returned it for reasons unrelated to the SSD.

8.5GB space savings removing unused XCode platforms
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 5 hours unless noted. Certain deals may last longer.
$1497 SAVE $500 = 25.0% $102 FREE ITEMS Nikon D750 DSLR in Cameras: DSLR
$2798 SAVE $400 = 12.0% Sony a7R III Mirrorless in Cameras: Mirrorless
$3498 SAVE $1000 = 22.0% Sony a9 Mirrorless in Cameras: Mirrorless

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | Twitter
Copyright © 2019 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__