I need help updating Xcode

xcode

I have a mac that I primarily use for xcode (so I am not really familiar with how Macs work). I develop iOS apps. Of late I have been running out of space. I delete as much as I can and the space keeps filling up. I have an external drive that I can move thing to. So I moved a bunch of stuff last night so I had 8 GB free and tried to do the update. In the morning it said the update failed because I don't have enough space (400 MB available). I deleted Xcode 4 which freed up 10 GB of space. Immediately the available space started to drop and now it is down to 8 GB. The only thing that seems to be running is Application update.

Question: When an application update fails does it keep the space it is using? That is, do I have many copies of multi-GB partial downloads of xcode hidden somewhere on my disk? if so, where?

Best Answer

There's a possibility that it's Time Machine local storage; though I'd use something like GrandPerspective to see what is taking up the most space.

If it is local backups...

Disable Time Machine Local Backup Storage

Here’s how to turn off local backups:

Launch Terminal from /Applications/Utilities
Enter the following command:
sudo tmutil disablelocal

Enter the admin password when requested to disable local backups

Re-Enable Local Time Machine Backups

sudo tmutil enablelocal

Remember, if you disable this feature you will not have local backups anymore, so if something goes wrong you will be out of luck. It’s important to have regular backups of your data, and so if you’re going to disable this be sure to still use Time Machine, perhaps even initiating a manual backup before you disconnect the drive, in order to preserve a recent copy of your data.

Source: http://osxdaily.com/2011/09/28/disable-time-machine-local-backups-in-mac-os-x-lion/

As regards temporary downloads…
They really ought to clean themselves up automatically, but if you're feeling brave & want to dig [very carefully] down into the filesystem, they live deep inside /private/var/folders/
I'd use something like EasyFind (freeware) to search for the string com.apple.appstore in Invisible files & folders, & look inside the most recently-modified folder matches (double click one of the found folders to open in Finder).
But I'd be really careful to be absolutely certain of what you're doing in there - I don't know if partial downloads will be obvious & in cleartext. I wouldn't touch anything with an unfathomable name.