The Xcode Previews folder holds the simulator copies Xcode makes to show SwiftUI previews in the canvas. It is safe to delete. Quit Xcode first, move the folder to the Trash, and Xcode rebuilds the preview devices the next time you open a preview, with a slower first run.
- Path
~/Library/Developer/Xcode/UserData/Previews- What it is
- Simulator devices Xcode creates for SwiftUI previews
- Typical size
- Often a few gigabytes; grows with the number of preview device types used
- Made by
- Xcode
- Safe to delete?
- Safe to clear
- Comes back?
- Yes, Xcode makes them again the next time a preview runs, which takes a little longer
What is in this folder?
SwiftUI previews run in a hidden simulator rather than on your regular devices. Xcode creates those preview simulators here, separate from the ones in CoreSimulator Devices that you see in the Simulator app. Each device type you preview on adds more files.
Nothing here is your design or code. Previews are drawn from your source files every time.
Is it safe to delete?
Yes. These are working copies for a feature Xcode can recreate. After deleting them, the first preview shows a longer loading state while Xcode builds a fresh preview device, and then it is back to normal.
Close Xcode first so it is not holding a preview device open. If the canvas stays stuck on "Failed to launch", clearing this folder is a common fix.
How do I clear it by hand?
- Quit Xcode and the Simulator app.
- Run the command below, or drag the folder to the Trash in Finder.
- Reopen your project and the canvas. Give the first preview a minute.
rm -rf ~/Library/Developer/Xcode/UserData/PreviewsQuit Xcode first. Deleting preview devices while the canvas is rendering can leave it stuck until you restart Xcode.
How do I stop it growing?
There is no setting for it. Clear it when it gets large, or when previews stop loading.
How Clean House handles it
Clean House recognizes this folder as SwiftUI preview devices made by Xcode and rates it as rebuildable, with a note that previews take slightly longer the first time afterward. It goes to the Trash, so Recently Cleared can restore it.