12

So I just updated my Mac with the latest macOS version 10.14.4 (18E226) but had to delete Xcode to make some space for updating the OS.

Currently I have 37 GB of free space, still while downloading Xcode from the App Store it shows

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

How much space is required?

I have already tried clearing all cache files.

shim
  • 9,289
  • 12
  • 69
  • 108
Ashish Kumar
  • 755
  • 2
  • 6
  • 25
  • 4
    Possible duplicate of [Xcode on Mac App Store can't install , show disk space not enough](https://stackoverflow.com/questions/53432700/xcode-on-mac-app-store-cant-install-show-disk-space-not-enough) – timbre timbre Apr 11 '19 at 16:08
  • I have 88 GB free, can't update from xcode 10 to xcode 11... – Jonny Sep 24 '19 at 05:28

10 Answers10

21

I was having the same problem. Even though macOS shows enough free space it does not have it as it accounts purgeable space as usable but I guess the installation of Xcode for some reason is not able to claim it. A lot of space if probably held by TimeMachine local backups. You can claim space back by freeing that space with the terminal command

tmutil thinlocalsnapshots / 10000000000 4

This frees 10GB (took a little over a minute on my 2014 MBPro)

It worked for me. I had 40GB free, even after deleting my previous xCode version but was unable to install. After running that tmutil command it worked

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Cortex
  • 2,300
  • 2
  • 15
  • 14
8

For Xcode 12 - 30 Gb free, 40 Gb free - show an error "There is not enough disk space available to install the product."

So in my case - I clean my ~/Library/Developer/Xcode/iOS DeviceSupport/ folder, 50 Gb free - and now I can download Xcode 12...

Launchpod shows it needs to download 11,16 Gb, but you need ~50Gb of free space

PavelK
  • 81
  • 1
  • 2
  • You nailed it by saying that XCode needs 50 Gb. I was about to give up when I had 45 Gb free space and it wasn't downloading until I saw this. I cleared it until 50 Gb were free and now it's installing – Thomas Huitema Feb 22 '21 at 21:31
5

XCode 12 requires you to have 40GB or more disk space or you will get the error "There is not enough disk space available to install the product.".

One can try to make space by clearing old iOS simulators from "~/Library/Developer/Xcode/iOS\ DeviceSupport/" and "~/Library/Developer/Xcode/DerivedData/" or removing old xCode.

Roshin Raphel
  • 2,612
  • 4
  • 22
  • 40
2

I used to download the Xcode xip file and copied it to an external drive. Then I open the Archive Utility app -> Preference -> Save expanded files to the Application directory. Now open the Xcode xip file from an external drive it'll extract the file to the application directory of mac. No need to have more space, I had only 18GB of free space.


Update: Xcode 12.5.1

Now it's working only if you've around 37GB of free space.

Vinoth Vino
  • 9,166
  • 3
  • 66
  • 70
1

i had 42 GB Space and i was successfully able to install xcode 12.4 via app store.

0

Just found another solution which worked for me: download Xcode from Apple Developer, and after the download completes open it with "Archive Utility".

shim
  • 9,289
  • 12
  • 69
  • 108
Ashish Kumar
  • 755
  • 2
  • 6
  • 25
  • 1
    This solution did not work for me at 18GB of space. The utility said it can't be expanded because the selected volume doesn't have enough space. Trying to download Xcode 11 GM Seed. – C. Skjerdal Sep 11 '19 at 16:02
  • I dont think its a valid solution. I previously installed in the same way but having update issue, I dont know why but due to this experience I dont recommend this way to install xcode. – user6159419 Oct 01 '20 at 16:58
0

Though you already got the answer. But I have solved this in other simple way by following steps

Run this command in terminal to install/expand the Xcode

xip -x ~/Downloads/Xcode_12.4.xip   

For Application directory installation

cd ~/Applications #otherwise, will unpack into home dir

Note : You can use ur desired Xcode version like Xcode_10.2 or something else

Download Xcode manually from https://developer.apple.com/download/more/

Mimu Saha Tishan
  • 2,402
  • 1
  • 21
  • 40
0

In my case, using also Android Studio to develop, I have to delete old simulators in folder:

/Users/UserName/.android/avd 
Alessandro Mattiuzzi
  • 2,309
  • 2
  • 18
  • 24
-1

➼ All you have to free 30+ gb space and then restart laptop.

Note: Restarting your laptop is must in order to get rid of this warning (There is not enough disk space available to install the product)

Haseeb Javed
  • 1,769
  • 17
  • 20
-2

I guess you should check how much does your system file take up in your mac. I cleaned up a lot of redundant files categorized in system and left with 30GB free space, the Xcode.xip works!