MacOS – Xcode 5.1.1 update error persists

mac-appstoremacosvirtualboxxcode

I'm running OS X Lion in VirtualBox on Windows 8 (I know, that's cheating, sorry 🙂 to be able to use Xcode. Everything worked fine, until Apple decided that they don't accept apps to the App Store from Xcode lower that 5.1.1. But it just won't update.

After two days of unsuccessful attempts to update Xcode, I finally know what the problem is, but it's very strange. I followed some advice here, enabled debug menu in App Store, set 2nd debug level, and install.log file finally revealed the issue. Turns out, there's not enough space for Xcode to update.

When I check free space in Finder (right click -> Get Info), it says there's 4 GB free (was 6 GB before I tried to update). But here's the strange part, when I check with Disk Utility, it says that the partition is completely full (no white space). I tried to expand the partition with Disk utility and gParted live cd, and it does not want to expand. But there should be that 4-6 GB of free space, I don't know what is going on, it downloads all 2 GB of Xcode just fine, error occurs during installation. I really need some help here, I can't release an update to App Store because of it.

Here's the last entry from install.log:

Jun 29 09:51:06 localhost installd[229]: PackageKit: Install Failed: Error Domain=NSCocoaErrorDomain Code=640 "You can't save the file "MainPartition" because the volume "MainPartition" is out of space." UserInfo=0x7fdde5a5ddd0{NSFilePath=/} {
    NSFilePath = "/";
}

Best Answer

Solved by manually downloading latest Xcode from developer.apple.com/downloads/. Everything updated just fine.