Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My Xcode installation is taking up loads of space; how to reduce space used by simulators?

So my computer is the base model MacBook Pro so hard drive space is a premium.

I've been looking through folders to find what's taking up all the space and my UserName/Library/Developer folder was 30GB. This folder contains Xcode & CoreSimulator.

I've gone and deleted most of my archived projects and that's reduced the size down to 20GB in total with 18GB in the Xcode folder, but this still seems large.

I haven't got any of the simulators installed, except for the current 8.4 simulator, yet I seem to have a folder for each simulator in the iOS DeviceSupport subfolder of Xcode.

Can someone tell me if their Xcode folder is a similar size and if I should expect all of the simulators to be included in this folder, even if they aren't visibly available in Xcode? Is it safe for me to delete all of these unused simulators?

like image 993
Mark Bridges Avatar asked Jul 17 '15 12:07

Mark Bridges


People also ask

Why does Xcode take up so much storage?

Xcode is itself a large, complex app; it contains many other large, complex apps like Instruments and iOS Simulator; it includes many large, complex tools like the compilers; it packages up SDKs with tons of detailed data about every declaration in every supported Apple OS; and it includes several simulator runtimes, ...

How do I reduce the size of Xcode on a Mac?

Go to ~/Library/Developer/Xcode/DerivedData/ and delete the folders for projects that you no longer need to keep this data around for. 2. iOS Device Support Xcode is storing information about the devices you have used for development. Delete the data no longer needed in ~/Library/Developer/Xcode/iOS DeviceSupport/ .

Why is Xcode 12gb?

Why is Xcode so large? Xcode supports four different operating systems, iOS, iPad OS, macOS, and tvOS. And for each of those, it supports multiple versions. For each OS, it has simulator runtimes, libraries, compilers, and software development kits.

How do I delete all Simulators in Xcode?

The best way to delete them is in Xcode. Go to Window -> Devices and Simulators . This will open a new window with all the devices you use in Xcode. At the top, tap on Simulators and you'll see a list on the left-side.


2 Answers

Yes, it is safe to remove all the simulators.

Your best option is probably just to install again Xcode, this way you could just sudo rm -rf /Library/Developer and rm -rf ~/Library/Developer then install again everything (a simple download that is.)

like image 197
Antzi Avatar answered Jan 15 '23 14:01

Antzi


Just found out you can run the following command in terminal to delete unused simulators and free up some space:

xcrun simctl delete unavailable
like image 38
Mark Bridges Avatar answered Jan 15 '23 15:01

Mark Bridges