Is it safe to delete SwiftUI preview simulators?

~/Library/Developer/Xcode/UserData/Previews · Safe to delete

What it is

Simulator devices Xcode creates just to render SwiftUI previews.

Can you delete it?

Yes, it is rebuilt automatically. Xcode creates them again the next time a preview runs.

How to clean it safely

  1. Quit Xcode.
  2. Run: xcrun simctl --set previews delete all

How big is it on your Mac?

This read-only command prints its size and changes nothing:

 Terminal
du -sh ~/"Library/Developer/Xcode/UserData/Previews" 2>/dev/null

Step-by-step guide: Clean up Xcode →

Questions

Is it safe to delete ~/Library/Developer/Xcode/UserData/Previews?

Yes, it is rebuilt automatically. Xcode creates them again the next time a preview runs.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac