Trashing those folders along with the application should restore about 11GB of disk space from the Mac and OS X will no longer have Xcode. Visit the “Developer” folder and delete it.
Open the user home directory and go to Library.The directory is ~/Library/Developer/, the user folder should contain “Xcode” and “CoreSimulator” folders:
Next you’ll probably want to delete the user Developer tools folder, found at the following location – note this includes user developer data, so don’t do this if you have projects and other data in Xcode that you haven’t backed up elsewhere or you otherwise care about:
How to delete Xcode depends on what version you are trying to remove from the Mac. Installing Xcode is just a matter of downloading it from the Mac App Store, but what if you want to remove Xcode? The additional aspects include things like the Interface Builder, iPhone Simulator, Quartz Composer, Dashcode, gcc, dtrace, perl, python, ruby, and much more that has use beyond core iOS and Mac OS X development, adding valuable utilities to tweakers and administrators toolkits. Xcode is Apple’s developer suite for iOS and Mac OS X, it’s necessary if you intend to be write apps for either OS and installing it includes a number of other useful utilities other than the main IDE itself.