Xcode failed to download, use the purchases page to try again

I encountered this problem many times, and I found today that it's caused by lack of disk space.

In my machine there is more than 7GB spare space, and after downloading the files, it reported this error.

Today I find the real problem from /private/var/log/install.log, it is caused by low disk space, so I made more space, and the update succeeded.

Since the download is 6 GB you'll want to delete old versions and have at least 15 GB free space before trying again to download. Look in /var/folders for paused / stuck downloads as well as perhaps cleaning any local time machine snapshots once you delete a large app like Xcode. Even after emptying trash, it will consume space for a few days or longer if you don't regularly have a Time Machine volume attached to let the snapshots age out.


So I eventually succeeded in installing Xcode. Here's what I ended up doing:

  1. I signed out of the App Store using Store --> Sign Out.
  2. I reboot the machine and held Command + R to enter the disk utility.
  3. I ran the disk verification utilities and made sure everything came out ok.
  4. After restarting the machine again I was able to install xcode.

No idea if all or any of those steps were required, but eventually I was able to get it to install.