284

What is the easiest way to update Xcode on OSX?

I see this in the terminal:

$ brew install xxxxxxx
Warning: Your Xcode (4.3.3) is outdated
Please install Xcode 4.6.

But when I go to open up Xcode > Preferences > Downloads, it says there are no updates?

Evan R.
  • 3,277
  • 3
  • 16
  • 14

15 Answers15

370
  1. Open up App Store

    enter image description here

  2. Look in the top right for the updates section (may also be in lefthand column "Updates"..)

    enter image description here

  3. Find Xcode & click Update enter image description here

Doug Null
  • 7,989
  • 15
  • 69
  • 148
jjn
  • 3,732
  • 1
  • 14
  • 4
  • 181
    Just want to also note that this will only show as an update if you installed your version directly from the App Store. However, if you installed it from elsewhere, you will need to re-download the entire new version of Xcode. – CodeBiker Aug 03 '13 at 20:39
  • Is there a terminal solution to forcing xcode to update? I let it update through the app store overnight and Xcode still did not get updated. – Josh Bradley Jul 21 '15 at 01:59
  • any idea with this case?http://stackoverflow.com/questions/35202711/problems-with-xcode-7-2-1 – jose920405 Feb 04 '16 at 15:47
  • In my case, I need to update twice, currently im updating it for the second time. Hope this is the last time I need to update. xcode 6.x to 7.2.1 – Yakob Ubaidi Feb 22 '16 at 14:18
  • 7
    No Xcode update shows up for me in the Updates section. I've just updated from Yosemite to El Capitan and Xcode is currently version 7.2. But need 7.3 to develop for my iPhone which now is on version 9.3 of iOS. – Alyoshak Mar 29 '16 at 14:31
  • 25
    Just search for the xcode in the searchbox, there you will get the xcode with the option to update the xcode even if you not installed using appstore. It works for me in Yosemite – Mohamed Hussain Apr 27 '16 at 07:06
  • Searching for xcode on the search box and installing it worked on Sierra too – Americo Savinon Jan 09 '17 at 19:26
  • 1
    I had to upgrade my macOS first, then Xcode appeared in list of things to update – Drew LeSueur Apr 08 '17 at 02:36
  • did mine never start updating or is there really no progress indicator? – Tony May 25 '17 at 23:24
  • Said I had to log in with appleid, and entered it, and it didn't work. It didn't say the id or password was wrong. When I made the password different on purpose, it did. It just loaded, and then sent me back to the username and password – whackamadoodle3000 May 01 '18 at 04:00
  • 5
    Apple is so damn frustrating. The last several OS upgrades have broken so many things. Wasting hours trying to fix everything Mojave broke. – Andrew Leyva May 03 '19 at 01:34
  • 3
    OK, I'm on Mojave 10.14.5 and my Xcode is 10.1. I see in AppStore the version history shows lastest version as 10.2.1, but still no suggestion to update from it, only OPEN is available, no matter if I try to search for it or whatever else, damn buggy piece of crap... I need this latest version to build my app! – RAM237 May 22 '19 at 23:24
  • How can I use another account in Appstore – sejn Nov 21 '19 at 06:02
  • The App Store does not show an update for Xcode 11.4, even though I am running 11.1 – Gerry Apr 28 '20 at 14:51
  • Today is Nov 16, the latest version was released at Nov 12. I still don't see any update in App Store. – Kimi Chiu Nov 16 '20 at 01:25
123

softwareupdate --list see the list of outdated software.

softwareupdate --install --all update all outdated software.

softwareupdate --install <product name> update the software you named.

Vlad Frolov
  • 7,445
  • 5
  • 33
  • 52
L_K
  • 2,838
  • 2
  • 16
  • 36
  • 27
    Did not work for me on Sierra. `softwareupdate --list Software Update Tool Finding available software No new software available.` – Jonathan Cross Nov 28 '17 at 23:52
  • 17
    Doesn't work on MacOS Catalina 10.15.1. `softwareupdate --install Xcode` says `Xcode: No such update` – Ron Kalian Oct 30 '19 at 13:44
70

Sometime I don't see the Xcode update in Updates tab in AppStore
So I search Xcode in AppStore enter image description here

Then click update and it update

Linh
  • 57,942
  • 23
  • 262
  • 279
  • 7
    I think somehow the update is not detected after OS update, this solution worked for me. – Alexey Podlasov Dec 26 '16 at 17:11
  • 1
    I was asked to install Xcode all over again. Perhaps due to the High Sierra upgrade.. No idea. Had it installed before. – rhand Jan 20 '18 at 11:31
  • 2
    After an OS update, it was saying there were no updates, even though 12 was available and I was on 11.5. I went to the app store and searched, it had an "open" button (not an "update" button). But when I clicked into the details, it did have an "update" button. – Dale Sep 28 '20 at 16:35
66

enter image description here

If attempting to download via the App Store leaves you with a little grey spinner and nothing actually happening, then you can go to :

https://developer.apple.com/download/more/

log in with your Apple Developer ID, and the latest Xcode should be available as a .zip download.

Community
  • 1
  • 1
kris
  • 11,868
  • 9
  • 88
  • 110
  • This only allows me to download xCode 9, I want to download 8.2.1 what should I do? @kris – alper Sep 22 '17 at 08:52
  • 1
    @Avatar - that is strange, when I visit https://developer.apple.com/download/more/ and scroll down I can also see earlier versions, including 8.2.1 - maybe pursue this with Apple Help – kris Sep 27 '17 at 14:39
  • 1
    I had captain when I update to high sierra problem has been solved. @kris – alper Sep 27 '17 at 15:03
  • 1
    why appstore keeps hanging on this spinner? I'm sure it spins but actually doesnt do anything behind the wheel. – Nicolas Manzini Nov 07 '17 at 14:33
  • Keep in mind that it spun for about 5 minutes for me before downloading – forresthopkinsa May 02 '19 at 05:53
37

In my case (Xcode 6.1, iOS 8.2) I did not see the update in AppStore. I found Xcode 6.2 for download and pressed "Install". Then, it installed and asked for the update (more than 2 Gb). Xcode 6.2 works correctly with iOS 8.2 and iOS 8.1.2

Hopefully this tip will help somebody else...

Arkady
  • 3,196
  • 24
  • 19
20

xcode-select --install worked for me

Joe Bobson
  • 1,216
  • 15
  • 19
9

Another best way to update and upgrade OSX development tools using command line is as follows:

Open terminal on OSX and type below commands. Try 'sudo' as prefix if you don't have admin privileges.

brew update

and for upgrading outdated tools and libraries use below command

brew upgrade

These will update all packages like node, rethinkDB and much more.

Also, softwareupdate --install --all this command also work best.

Important: Remove all outdated packages and free some space using the simple command.

brew cleanup
Akshay Thorve
  • 678
  • 6
  • 10
7

If you want the latest Beta, it will not be in the AppStore. Instead you have to login to https://developer.apple.com and download from there.

jackocnr
  • 17,068
  • 10
  • 54
  • 63
5

I was able to fix the 'no updates' problem by going to the AppStore via the developer's link:

https://developer.apple.com/download/release/

Also, you might want to try this 'mas-cli-github' command,

$ brew install mas

$ mas list
$ mas search Xcode
$ mas install <id> 

$ mas upgrade <id>
user9869932
  • 6,571
  • 3
  • 55
  • 49
4

Check https://xcodereleases.com/ where you can also download legacy versions.

hankchiutw
  • 1,546
  • 1
  • 12
  • 15
3

I ran into this bugger too.

I was running an older version of Xcode (not compatible with ios 9.2) so I needed to update.

I spent hours on this and was constantly getting spinning wheel of death in the app store. Nothing worked. I tried CLI softwareupdate, updating OSX, everything.

I ultimately had to download AppZapper, then nuked XCode.

I went into the app store to download and it still didn't work. Then I rebooted.

And from here I could finally upgrade to a fresh version of xcode.

WARNING: AppZapper can delete all your data around Xcode as well, so be prepared to start from scratch on your profiles, keys, etc. Also per the other notes here, of course be ready for a 3-5 hour long downloading expedition...

Selly
  • 331
  • 3
  • 3
  • Note once you zap xcode you'll have to reinstall dev tools: https://gist.github.com/gaquino/87bdf0e6e852e445c0489379d3e9732a – Jake Sylvestre Jul 14 '18 at 05:14
3

You DO NOT need to upgrade Xcode.

Just open the file /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb ,

then remove this line check_xcode_minimum_version in the following function.

def fatal_build_from_source_checks
    %w[
      check_xcode_license_approved
      check_xcode_minimum_version //<-- this one
      check_clt_minimum_version
      check_if_xcode_needs_clt_installed
    ].freeze
    end

Then brew install should works fine.

N69S
  • 16,110
  • 3
  • 22
  • 36
jcccn
  • 827
  • 6
  • 6
  • 5
    Why do you assumed that he DO NOT need to upgrade XCode, Apple Store consistently requires updates of Xcode builds, unless they do not allow you to upload app updates. – DJ. Jun 11 '20 at 15:55
2

I used the Command_Line_Tools_OS_X_10.XX_for_Xcode_7.2.dmg and therefore had to download the latest version from here.

lony
  • 6,733
  • 11
  • 60
  • 92
0

For me it was >41GB for the update to start. ~/Library contains a lot of cached content for mail, browsers, etc...you can safely remove those. Remove big apps too, like iMovie..you can always install it back later

Taras Gleb
  • 158
  • 2
  • 5
0

I couldn't find the updates in the app store. I ran the following code: "sudo rm -rf /Library/Developer/CommandLineTools", entered my macbook password, and then "xcode-select --install"

Abimbola Ojikutu
  • 447
  • 4
  • 10