Question or issue on macOS:
I have an issue that I can only assume is with Xcode, where my apps take forever to run and crash the phone/restart about 75% of the time. I tried using older versions of the code that I’d saved instead, but they had the same effect, which they didn’t use to have about a month ago.
I’ve looked up every single possible way to solve this issue for the past few weeks have haven’t found anything, so I want to completely uninstall Xcode and clear all settings; but I can’t find a way to do this. I can uninstall it, but when I reinstall it, it still has all of my old settings and lists of projects etc. How can I completely uninstall it?
How to solve this problem?
Solution no. 1:
For complete removal old Xcode 7 you should remove
Solution no. 2:
For a complete removal of Xcode 10 delete the following:
But instead of 11, open up
/private/var/in the Finder and search for “Xcode” to see all the ‘dna’ left behind… and selectively clean that out too. I would post the pathnames but they will include randomized folder names which will not be the same from my Mac to yours.
but if you don’t want to lose all of your customizations, consider saving these files or folders before deleting anything:
Solution no. 3:
- Go to > About This Mac > Window > Storage Management
- Or, hit ⌘ + Space to open Spotlight and search for
Applicationson left pane.
- Right click on
Xcodeon the right pane and select delete.
This will remove XCode from the installed applications list of your Mac’s App Store.
Update: This worked for me on macOS Sierra
Solution no. 4:
Before taking such drastic measures, quit Xcode and follow all the instructions here for cleaning out the caches:
How to Empty Caches and Clean All Targets Xcode 4
If that doesn’t help, and you decide you really need a clean installation of Xcode, then, in addition to all of the stuff in that answer, trash the Xcode app itself, plus trash your
~/Library/Developer folder and your
~/Library/Preferences/com.apple.dt.Xcode.plist file. I think that should just about do it.
Solution no. 5:
FOR UNINSTALLING AND THEN BEING ABLE TO REINSTALL XCODE 9 CORRECTLY
I followed the topmost answer for deleting Xcode 7 and found a major error, deleting
~/Library/Developer will delete an important folder called
PrivateFrameworks, which will actually crash Xcode everytime you reinstall and force you to have to get your friends to send you the PrivateFrameworks folder again, a complete waste of time seeing if you needed to uninstall and reinstall Xcode urgently for immediate work purposes.
I have tried editing the topmost answer but see no changes so below is the modified steps you should take for Xcode 9:
~/Library/Preferences/com.apple.dt.* (Generally anything with com.apple.dt. as prefix is removable in the Preferences folder)
/Library/Developer directory except for
Solution no. 6:
This answer should be more of a comment against Dawn Song’s comment earlier, but since I don’t have enough reputation, I’m going to write it as an answer.
According to the forum page
“In general, you should never just delete the CoreSimulator/Devices directory yourself. If you really absolutely must, you need to make sure that the service is not runnign while you do that. eg:”
# Quit Xcode.app, Simulator.app, etc sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService rm -rf ~/Library/*/CoreSimulator
I definitely ran into this issue after deleting and reinstalling Xcode.
You might encounter a problem trying to connect the build to a simulator device. The thread also answers what to do in that case,
gem install snapshot fastlane snapshot reset_simulators
Solution no. 7:
Run this to find all instances of Xcode in your filesystem:
for i in
find / -name Xcode -print; do echo $i; done