> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to clear/reset SwiftUI Preview Caches?
- URL: https://developerinsider.co/how-to-clear-reset-swiftui-preview-caches/
- Published: 2023-09-25T10:12:25.000Z
- Updated: 2023-10-17T04:52:55.000Z
- Author: Vineet Choudhary
- Tags: SwiftUI, SwiftUI Preview, Xcode, Xcode Preview

If you run into any SwiftUI Preview related issue, then there are high chance that you are facing that issue due to some cached preview data. Here are the steps to reset the SwiftUI Preview Caches:

1. Close Xcode.
2. Run the following command in the terminal:  
```sh  
xcrun simctl --set previews delete all  
```
3. Cross-check if all the data is deleted from `~/Library/Developer/Xcode/UserData/Previews` directory. If not then you can delete this directory manually by running the following command in the terminal:  
```sh  
rm -rf ~/Library/Developer/Xcode/UserData/Previews  
```
4. Delete the CoreSimulator caches directory by running the following command in the terminal:  
```sh  
rm -rf ~/Library/Developer/CoreSimulator/Caches  
```