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 anywh
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.
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.
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.
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.