How can I actually uninstall Xcode?
Solution 1
Finally found the solution to reinstalling XCode. Although I had deleted it from my primary Applications folder, I had a secondary System installed on an external drive, and XCode was present there. Removing it from the Applications folder on THAT drive - even though I was not booted from it - allowed me to reinstall XCode from the app store.
Solution 2
Drag Xcode.app into the trash. That's really about it. Bin your /Developer
directory too (if you have one from an old Xcode install.)
The /Developer
directory is now in /Applications/Xcode.app/Contents/Developer
. The app package now contains everything.
...Everything, that is, except the command line tools, which you might well need. These can be installed from within Xcode (Preferences->Downloads->Components tab.) Instruments (and other developer tools) are now launched through the Xcode main menu (Open Developer Tool) rather than loading directly from Finder.
Solution 3
This solution worked for me:
Find the shortcut for Xcode (desktop,Dock etc.)
Go to: "Options" and then to "Show in Finder"
The file you are now looking should be named:"Xcode.app". This is the file you need to delete.
Now move this file (drag & drop) into the trash*. *If you try to run Xcode it will tell you that it can´t be run because its in the trash.
Empty the trash*. *This proces took me some time since Xcode is around 1.8 Gb in size
Restart your Mac.
Go to the App store (the shortcut is located at the Dock -- Launchpad When you open AS you will find Xcode under the "Developer Tools". There the AS let me only install it. It installed Xcode by automatically downloading it and installing.
All errors and problems (I had) were gone after the reinstallation. This solution worked for : Xcode 5.0.1 on Mac mini, Mac OS X 10.9.1. Other solutions considering sudo commands did not work for me. I don´t know how Xcode 5 was installed. Xcode was located in the Applications folder.
Solution 4
You need to install the command line tools (through Xcode Preferences) to be able to install Homebrew.
Xcode doesn't create a /Developer
folder anymore, whether you install it through the App Store or not. This shouldn't (and doesn't) cause a problem with Homebrew.
Related videos on Youtube
JVC
Updated on April 04, 2020Comments
-
JVC about 4 years
I'm having issues with Xcode and trying to install Homebrew, so I decided to just uninstall Xcode and start fresh. However NONE of the uninstall methods I have found anywhere online, work.
For starters, I installed via the App Store, for whatever that's worth. It seems to mean some things are different from those who did not.
Next, I have no
/Developer
directory, so ANYTHING that wants me to run something starting with a/Developer
path will not work.There is no
/Library/Developer/Shared/uninstall-devtools
so executing that will always fail.Deleting the Xcode.app from my Applications folder and emptying trash, doesn't appear to have done anything except remove the actual application itself, the App store still thinks it's installed. I still can't install Homebrew.
How on earth can I actually succeed in uninstalling this thing?
EDIT: Does nobody know how to uninstall the App store version of Xcode so that I can reinstall it? =(
-
bames53 almost 12 yearsDeleting the Xcode app ought to work as far as the App Store recognizing that it's no longer installed. I'm not sure why it's not, or how long the App Store might take to recognized that it's gone. The only other thing you might need to get rid of are the command line tools if you installed them. I'm not sure but I'd guess that there's some uninstall script inside the Xcode.app bundle for the command line tools.
-
Caleb almost 12 years@CanBerkGüder If Xcode doesn't fall under the heading of "software tools commonly used by programmers," I don't know what does. This isn't a question that applies to just any application, and the way that Xcode is distributed and installed has changed significantly. The OP is far more likely to get a good answer here than on apple.SE.
-
-
JVC almost 12 yearsAha... ok, that clears up a lot. However now that I've deleted the XCode app, I can't run it to install anything, and the App Store still thinks it's installed. Sooooo... now what?
-
Tim almost 12 years@Jonathan, do you still have "Install Xcode" in /Applications? This was used the first time Xcode was distributed on the App Store. It's not used now. Remove it if so.
-
JVC almost 12 yearsNope, I had never installed XCode before so the App Store version is all I've ever known.
-
JVC almost 12 yearsLOL I just figured it was a very simple mistake anyone could make, and it might drive someone else crazy too. Didn't really think it was "coming clean" but I'll take the +1! ;)