Xcode update would not work, and now won't leave the App Store update queue
Solution 1:
I was having this exact same issue all night and wasted a good 3 hours troubleshooting it. I didn't have to go through all of the steps that the other answer provided, but my fix was simply deleting my existing XCode from /Applications using an app called AppZapper (the OS X equivalent of Revo Uninstaller for Windows).
AppZapper makes sure to delete all of the other files associated with the application you are trying to remove. You have to select a checkbox in the preferences in order to be able to delete Apple applications, but as soon as I zapped my existing XCode and emptied the Trash, the new XCode immediately started downloading from the Mac App Store.
Solution 2:
I was able to fix this problem by correcting the permissions for Xcode. Run this from your Terminal:
sudo pkgutil --repair com.apple.pkg.Xcode
It actually installed as I was doing this. Many of the permissions reported as "should be drwxrwxr-x , they are drwxr-xr-x".
Solution 3:
Just managed to get it downloading by requesting the web version (https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12) of the app store to trigger an external request (press allow).
On that "page" in the app store (where you may see screenshots of xcode) a button should also state "Update". And pressing that update button worked - different than the button in the "Updates"-Section posted by OP.
Don't know why, but saved me a ton of time not having to remove everything and redownloading.
Solution 4:
I had this problem. The issue was I had two copies of Xcode. I had recently upgraded to a new drive and had the old one mounted to copy things over. Xcode in /Applications
was updated, but the one in /Volumes/OldDrive/Applications
was not. After unmounting the old drive and relaunching App Store the update went away.
To look for other versions of Xcode, open Spotlight, search for Xcode
and wait a moment for the full Spotlight search to open up. If there's a list of Applications right below the Top Hit that may be your problem. Also check in /Developers/Applications
.
If that doesn't work, try resetting the iTunes Store cache. Quit the App Store, open iTunes, and in Preferences -> Advanced and click Reset iTunes Store cache
. Then reopen the App Store.
Finally, try Cmd-R in the App Store to refresh the Updates page.