When you run the app on a simulator, it stores your app data and if you want to delete that data then you have to delete the app from that simulator. It’s ok to delete the app when you’re trying it on one simulator but if you’ve to repeat that on 4-5 simulators then it is a time-consuming process. It would be better to reset all these simulators using just one command and we do have that command:

use xcrun simctl list to get the list of all simulators. xcrun simctl list

And then xcrun simctl erase all to reset all the simulators i.e to remove all the data.

First quit the simulator then use this command otherwise you will get an error like this xcrun simctl erase all

You can use this for UI testing where you want to test your app on a fresh install. So just run this command from the terminal before capturing screenshots (you can do that using fastlane).