How to recover from deleting Xcode CoreSimulator devices from disk? By mistake I deleted ~/Library/Developer/CoreSimulator/Devices from my Mac so all my Xcode simulators were deleted.

Now none of my Xcode projects run. When I try to, an alert shows that no simulator is selected in select device.
To get back to a vanilla state, quit Xcode, Simulator, Instruments, and any other CoreSimulator clients that you have and run:

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService 2&gt; /dev/null
rm -rf ~/Library/*/CoreSimulator