16

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?

3 Answers 3

15

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.

2
  • 1
    I changed my directory to Applications. Then I ran install Xcode. Here's what I got: usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... Is there anything else I should be doing?
    – Honey
    Commented Jul 18, 2017 at 16:56
  • 3
    @Honey Apple has actually changed how they handle the Xcode install since this original answer. Now, you can just delete Xcode from your Applications folder and download again from the App Store. Commented Jul 19, 2017 at 1:50
8

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.

3
  • 2
    This only removed Xcode command line tools, not full app
    – anki
    Commented Jan 31, 2020 at 6:44
  • 2
    @ankii Yes you are right, now that I read the original question again, I realized that it is talking about the app... I will leave my answer here in case somebody would get here by search and find the answer helpful...
    – AlexV
    Commented Feb 1, 2020 at 9:49
  • 2
    Although this does not answer the OP's question; it answers mine. Thank you. I did not really need to reinstall the app; its only my cli tools acting up.
    – flash
    Commented Mar 8, 2020 at 21:41
6

try this in terminal:

xcode-select --install

it brings up and downloads developer tools for you

1
  • 9
    xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    – karlingen
    Commented Jul 3, 2019 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .