I have a 250Gb M1 Mac Mini and it is starting to run out of disk space recently, it seems like the UI Previews is the main culprit which takes roughly 165GB space alone and is increasing each day. Tried to delete the folder using Dev Cleaner but was told not able to do so. Tried to google the issue but only found this thread with only a few replies. It makes me wonder is it just me or everyone has this issue?

- 2,632
- 7
- 29
- 45
3 Answers
I have the same problem. For me, DevCleaner is complaining about permissions, so I had to go to /Users/Me/Library/Developer/Xcode/UserData/Previews/Simulator\ Devices/ directory and manually delete simulator files.
Edit: Save space by
xcrun simctl delete unavailable
xcrun simctl erase all
- Delete
/Users/username/Library/Developer/CoreSimulator
folder.

- 964
- 12
- 21
-
Deleting that folder made my previews from working at all afterwards. – Isuru May 08 '22 at 14:37
-
Huh.. Xcode should be able to recreate previews. Have you tried re-starting Xcode? – Mikrasya May 10 '22 at 06:19
-
It finally started working. Phew! – Isuru May 10 '22 at 06:37
Xcode 14: Adding to what @TaeVitae wrote, I got tired of watching Xcode try and create the previews, so I did a bit more digging. I found that inside ~Library/Developer/Xcode/UserData/Previews/Simulator Devices/[device ID]/data/
, some of the biggest culprits taking up space were Containers
, Library
and var
.
I could easily delete Containers
and Library
. Deleting var
took way too long for Xcode to recreate the preview, so I stopped waiting.
Yes, Xcode recreates Library
, but deleting it significantly reduced the amount of storage it took up.

- 192
- 1
- 12
I had a similar issue where /Users/Me/Library/Developer/Xcode/UserData/Previews/ "Simulator Devices" and "Simulator%20Devices" where taking up over 400GB of space.
I only found this was an issue when "System Data" on my iMac was over 450GB
I found the solution here, to delete the simulator devices.
There was a little file called "device_set.plist" which i did not delete.
As to what may have caused this, I used the grand perspective app to see what was using all that space, and it ended up pointing to videos that were being played in previews.
The videos seem to load in a janky way and take a long time, and then to continue in the background when playing in xcode so I think that it might be related to the way SWiftUI Previews loads videos. However I am no expert, this is my speculation.

- 9
- 1