Mac – App Store: Not enough disk space to install Xcode

mac-appstorestoragexcode

Similar to Xcode free space requirement, but different details.

We could not complete your update

There is not enough disk space available to install the product.

The download size lists:

Version 11.0 • 7.6 GB

and my Mac has 31.2 GB available according to About This Mac : Storage

My question is this: How can I discover what the exact storage requirements are for this update without performing the update? I'm looking for a definitive answer, not methods for estimation. Thanks!

EDIT: I'm not looking for sector-specific values. I'm just trying to understand how much available storage is actually required for a successful update—clearly it's not 7.6 GB.

EDIT 2: Mysteriously, Xcode now updates with no change in available storage space. In fact, it appears I have a few hundred MB less available storage than before.

Best Answer

I don't think there is a definitive answer, because it's likely to depend on the specific Mac & how the data aligns to sector sizes when written. You'd see the same thing if you wrote a 1GB movie file & 1GB of small text files to a drive. The byte count may be the same, but the space used on disk would not.

If you look at the three basic ways to see how much space is left on your drive [Storage, Disk Utility & Get Info], one thing you'll notice is they don't actually agree on their definition of "free" space.

If your drive is so full that you are struggling to squeeze something on - which in itself is not a good thing, you really need to keep 10 - 20% free space, ironically more for a smaller drive - then the figure you need to be looking at is the one in Disk Utility, under the blue bar [green outline].

That is the amount of actual free space you have, including purgeable.
Purgeable data will not just get out of the way if you need the space all in one go. You need to either manually shrink local Time Machine backups, or incrementally fill the drive with junk data then erase it. If you have "Store in iCloud" set up, you need to give it time to work, whilst you do this.

enter image description here