I found that Xcode on my laptop consumes much of its storage, so I am trying to delete unnecessary files in Xcode.

There are four directories under Application/Xcode.app/Contents/Developer/Platforms/. I feel that WatchSimulator.platform and AppleTVSimulator.platform are not necessary, because I use Xcode almost only for basic iOS development.

I would like to know if I can delete those platforms directories directly?

Directories

share|improve this question
    
Just an FYI... You're only going to gain about half the space shown, as they appear to be compressed. Look at the Get Info sheet, e.g. on my system for WatchOS.platform it shows 50,579,830 bytes (28.2 MB on disk) for 2,212 items and AppleTVSimulator.platform shows 1,865,477,227 bytes (1.1 GB on disk) for 29,705 items. So you're not going to gain as much free space as the values shown in your OP. – user3439894 2 hours ago
    
The files are compressed and Apples's HFS+ File System supports Transparent Compression but Finder and ls in Terminal lacks a flag to see a file is using hfsCompression, sans the Get Info Sheet where you can see the on disk value is dramatically different then the size show in bytes. There is a utility written by a third party, which includes the source code if one wants to compile it themselves, afsctool. Among its capabilities is to get information about existing HFS+ compressed file(s). – user3439894 1 hour ago
up vote 3 down vote accepted

Yes, you can delete any simulator that you don't use. I do this routinely when I stop supporting older iOS versions.

If you delete them and then you find that you need them at some point in the future, you can redownload them from Apple's developer site.

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.

From there, find the simulator you want to delete and Cntl - click (or right-click) and select Delete.

I do this with each simulator that runs in each iOS version that I no longer support.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.