But Wait... It Gets Worse

So after purchasing and downloading Xcode via the App Store only to discover I didn't have enough disk space to install the app, I came up with an acceptable, if less than ideal, workaround. I'm not terribly happy with the state of things, but hey, at least I was able to get things back to a working state.

Today Apple released an update to Xcode. And here we go again.

Let the Good Times Roll

First off, there appears to be no way to update the software from the application page:

Nor does it appear in the Updates section of my Mac App Store:

To install the update I had to go to the Purchased section:

Ah! There it is, and it appears to see my current install. But this is what I get when I click the UPDATE button:

Nice. More useless error messages. See, I am signed into the account I used to purchase Xcode. So this makes no sense whatsoever.

Fortunately, I'm a SysAdmin, and this sort of thing is our forte. I figure App Store is probably confused because I moved the original installer app off my main hard drive due to space constraints that were causing the original install to fail. Putting the Install Xcode.app back in to /Applications should do the trick, I reason.

Sure enough, doing so allows me to run the update from App Store. Now I get this:

Well, that's pretty ironic! Seems like that's the message I should have gotten the first time I attempted to install Xcode 4.0. I'll call this progress though, as it's the first error message I've seen that might make any sense to a normal user. Still, though, there's no indication of how to fix the problem. Just how much disk space I'll need is never specified. Not before I began the process, nor during the process. This is simply terrible UI, folks. Simply terrible!

So I decided that probably the best way to clear up the needed space was to completely delete the current Xcode 4.0 install. I'm pretty sure that no matter what you do, the Install Xcode.app is going to overwrite everything anyway, so I may as well delete it.

Unfortunately, this leaves me with the original problem with the Update. I get this thing again:

So now I'm in a catch-22: If I keep everything I need for the Updater — the Install Xcode.app and the entire Developer folder — I don't have enough space to complete the update. But if I remove any of these items, the App Store isn't able to perform the Update because it doesn't seem to recognize the app as being fully installed (despite the fact that it sees it on the product page as installed) or as having been installed by me.

The first thing I tried was using a symlink pointing to the Install Xcode.app on another drive to clear some disk space. No dice. The actual Install Xcode.app needs to be in /Applications.

Next, I tried deleting just a portion of the Developer install, particularly the folder /Developer/Platforms/iPhoneOS.platform, which is just under 4GB. And now we're back to the "sign in to the account" message again. I also moved this folder and tried using a symlink to it as well, with the same result.

Next I tried removing the Install Xcode.app payload, a hidden folder that lives inside the app that's full of PKG bundles. Also no go.

It looks like the only way to update Xcode is to actually have Install Xcode.app and the Developer folder in their expected locations, and then, if you're short on disk space, to find several GBs of non-Xcode files — how many GBs I can only speculate, but I'll guess around 4 GBs (to give me a total of 10 GBs free) — to temporarily remove while I complete the update. Then, once the update is complete, I should be able to remove the Install Xcode.app (or move it to a backup disk) and put back the temporarily deleted files. Fun times!

Okay! So, after clearing up some space, the update still doesn't work! Argh! I am STILL getting the "updates for other accounts" message.

I'm at a complete loss at this point. And what do we do when we're at a complete loss, kids? That's right: Time to reboot.

Reboot to the Rescue

After rebooting and opening the App Store, and signing in to my account, here's what I see in the Updates screen:

App Store now sees my Xcode install and recognizes it as something it can update. This looks very promising. And this is what I see when I hit the UPDATE button:

Ahhh! Sweet blessed mercy! At last! It's working!

But wait… After the 20 minute "Update" process completes, App Store says my app is updated:

But Xcode begs to differ:

Turns out it's only the Install Xcode.app that's been updated:

So I run the Install Xcode.app, and this is what it tells me:

Un-fucking-believable.

Now What?

In theory, the best way for me to clear up disk space for an Xcode update is to delete the older version. I tried this before, however, and App Store got confused. But, ever the glutton for punishment, I simply must know if the Install Xcode.app will work under this scenario. It absolutely should. So I delete /Developer. Again. I rerun the updated Install Xcode.app and:

Seems to be working. It's about frickin' time.

The Deal

So here's the deal: Apple simply doesn't provide an accurate figure for how much disk space is required for installing Xcode. If you're wondering what the actual number is, I think I'm able to glean it from my experiments and am happy to provide this figure.

Also, there are a number of possible issues that can crop up if you happen to be low on disk space and are working around those constraints, so I'll provide some info on just what's going on under the hood with these updates.

Total Disk Space Required: 15 GBs

Itemized Disk Space Requirements:

  • Install Xcode.app: 4.5 GBs
  • Xcode and Related Developer Tools and Libraries: 10 GBs

What's Actually Happening During an Update:

  • When you update Xcode from the App Store, you're not actually updating Xcode. You're updating the Install Xcode.app.
  • You must have enough disk space at update time to accommodate this update, about 4.5 GBs.
  • After running the App Store update, you must run the Install Xcode.app to actually update Xcode.
  • The Install Xcode.app does not actually update existing components, it instead wants to completely overwrite your current install of /Developer, and so will need the full 10 GBs of disk space that install requires.
  • At this point, however, if you want to clear some disk space, it's safe to delete /Developer.

Additional Possible Issues:

  • In order to update Xcode, bare minimum, App Store obviously wants to see that Xcode is installed under the active account.
  • If App Store is complaining about your install or your user account, I highly recommend a reboot of your system before proceeding. This will likely cause App Store to fully recognize the install and account info, particularly if you've been mucking around in any way, shape or form.
  • The easiest way to manage all this is to keep the Developer Tools where they're expected — in /Developer — and to keep the Install Xcode.app where it's expected — in /Applications. If you have the disk space, this should make everything work more smoothly.
  • There are workarounds for this, but as you can see, they're not necessarily pretty.

All in all, I'd call this a major failure for the App Store. I'll say again, the App Store is meant to simplify the application installation process, and is meant primarily for the installation of simple, drag-and-drop type apps. By breaking its own protocol and using the App Store to install a complex suite of applications and libraries, Apple is both setting a terrible example for other developers, and creating one of the worst user experiences I've had in a very long time.