Releasing space in a MacBook Pro

Many of the applications I use require the gigantic package Xcode, which is often updated. An issue with these updates is that they always re-install a set of platforms. These are used I think to simulate several devices. Unfortunately they take up a lot of space. The platforms are located in /Applications/Xcode.app/Contents/Developer/Platforms. `du -hd 1` shows
1.4G ./AppleTVOS.platform
2.2G ./iPhoneOS.platform
1.1G ./WatchOS.platform
 46M ./MacOSX.platform
5.9M ./WatchSimulator.platform
4.5M ./AppleTVSimulator.platform
6.3M ./iPhoneSimulator.platform
4.7G
I don't use any of these except MacOSX (I tried to delete it the other day and learned it's actually required by Xcode). So erasing them (except again MacOSX.platform) saves about 4.7GBs in space, much needed in a laptop with only 128GBs in SSD :(