skip to Main Content

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?enter image description here

3

Answers


  1. 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

    1. xcrun simctl delete unavailable
    2. xcrun simctl erase all
    3. Delete /Users/username/Library/Developer/CoreSimulator folder.
    Login or Signup to reply.
  2. 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.

    https://www.reddit.com/r/iOSProgramming/comments/riguh3/xcode_preview_folder_increasing_in_size_what/

    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.

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search