Reinstalling XCode
I just upgraded to Lion, and was having problems with my old XCode installation, so I just removed it completely by running
sudo /Developer/Library/uninstall-devtools
sudo rm -rf /Developer
Now having removed the developer tools, I would like to reinstall them. But as soon as I go to the App Store, XCode is still marked as installed. How can I make the App Store realize that XCode has been uninstalled?
Solution 1:
The App Store actually recognizes the Install Xcode.app file in the Applications folder. So, in order to reinstall, just run Install Xcode again from the Applications folder. But, if you wish to redownload from the App Store, just delete the application from the Applications folder, empty your trash, and relaunch the App Store if it's open.
Solution 2:
This does not answer the question above, but I thought I would keep it here in case somebody who've got here by a search, would find it helpful. This advice deals with command line tools problems and not the XCode application.
To reinstall xcode command line tools
on macOS, simply run the following commands in your terminal:
sudo rm -rf $(xcode-select -print-path)
xcode-select --install
Unfortunately, it happens quite often when other command line tools are unable to find xcode or CLT, reinstalling it as shown above, helps.
Solution 3:
try this in terminal:
xcode-select --install
it brings up and downloads developer tools for you