iOS Simulator で「Reset Content and Settings…」を実行することにより、デバイスの中身をリセットすることができますが、デバイスごとに一つずつ行う必要があり面倒です。以下のスクリプトでインストールされているシミュレータをすべてリセットすることができます。
#!/bin/sh
instruments -s devices \
| grep Simulator \
| grep -o "[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}" \
| while read -r line ; do
echo "Reseting Simulator with UDID: $line"
xcrun simctl erase $line
done


