Here's what helps: In the Apple Manu, go to About this Mac > Storage > Manage > Developer (nice little Easter egg hunt, well done Apple!)
Look for older iOS variation you don't need, those can easily take up a good number of GBs
There are also big size options "Xcode Caches" and "Project Build Data and Indexes", though I'm not sure how much trouble might be caused by deleting those
Lastly, uninstall Xcode before installing a newer version
There also is a free ("suggested tip-ware") app named DevCleaner which essentially appears to look for the same files as described above
Some more proactivity on Apple's part on this would certainly be useful though. To just leave a user with a "Not enough disk space" error message upon trying to update Xcode when there are dozens of available GBs on the drive is not exactly helpful.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: