What is CoreSimulator Devices, and how do you shrink it safely?

CoreSimulator Devices is where Xcode stores every virtual iPhone, iPad and Apple Watch, including the apps and data you installed on them, so look before you delete.

Shiva ChandraMaker of Clean House · · 2 min read
Short answer

CoreSimulator Devices is the folder where Xcode keeps every simulator device you created, each with its own installed apps and data. Look first before deleting. Shut down running simulators, then use xcrun simctl delete unavailable to remove only old, unusable ones instead of the whole folder.

Path
~/Library/Developer/CoreSimulator/Devices
What it is
Virtual iPhones, iPads and watches for the Xcode Simulator, with their apps and data
Typical size
Commonly several to tens of gigabytes, more with many device and runtime combinations
Made by
Xcode Simulator
Safe to delete?
Look first
Comes back?
Simulators are recreated by Xcode, but apps and data you put on them are gone

What is in this folder?

Each subfolder is named with a UUID and holds one simulator: its disk, installed apps, app data and logs. Xcode creates a set of devices for each iOS version you install, so the count grows with every Xcode update. The simulator runtimes themselves (the iOS versions) are stored elsewhere and can be listed with xcrun simctl runtime list.

Devices left over from older Xcode versions are marked unavailable because their runtime is gone. Those are the safest to remove.

Is it safe to delete?

Not the whole folder, and not blindly. A simulator you still use may hold test data, signed-in accounts or an app state that took time to set up. Deleting the folder removes all of that. Unavailable devices hold nothing you can run, so removing them is low risk.

Never remove files while a simulator is booted. A running simulator is a live process reading from its device folder.

How do I clear it by hand?

  1. Quit the Simulator app and Xcode, then shut down anything still running.
  2. List what you have, then delete only the unavailable devices.
  3. To remove one device you know you do not need, delete it by its UUID.
xcrun simctl shutdown all
xcrun simctl list devices
xcrun simctl delete unavailable
xcrun simctl delete <UDID>
Use xcrun simctl rather than deleting folders by hand. It updates Xcode's device list, so Xcode does not point at devices that are gone.

How do I stop it growing?

Delete unavailable devices after each Xcode update and remove runtimes you do not test against. You can also create fewer device types.

How Clean House handles it

Clean House shows this folder as Simulator devices, rated Look first, and suggests xcrun simctl delete unavailable as the better way. It names each device from Xcode's own device list and does not move a simulator that is booted, which it detects by the simulator process running from inside the device folder.

Questions

Can I delete CoreSimulator Devices?

Only with care. Deleting the folder removes every simulator and the apps and data on it. Prefer xcrun simctl delete unavailable.

What does xcrun simctl delete unavailable do?

It removes simulator devices whose runtime is no longer installed, so they can no longer boot.

Why is CoreSimulator so large?

Every Xcode version adds device sets, and each device keeps its own copy of installed apps and data.

Sources

  1. Apple Developer: Running your app in Simulator or on a device
  2. Apple Developer: Xcode documentation