0

Title says it all. So from what I can tell there is enough disk space.

I have attempted to get it from the app store and just a straight up download. App store says not enough space, when I try to expand the .xip file download it says not enough space. I can't for the life of me figure out what I need to do since there should be more than enough space for 10 - 11 GB.

enter image description here

or

enter image description here

Running df seems to show there is enough space (unless I am not understanding this

Filesystem     512-blocks      Used Available Capacity iused     ifree %iused  
Mounted on
/dev/disk1s5s1  236568496  29659008  24677168    55%  500632 123385840    0%   /
devfs                 374       374         0   100%     648         0  100%   /dev
/dev/disk1s4    236568496   2099248  24677168     8%       2 123385840    0%  /System/Volumes/VM
/dev/disk1s2    236568496    528072  24677168     3%     790 123385840    0%   /System/Volumes/Preboot
/dev/disk1s6    236568496      1264  24677168     1%      19 123385840    0%   /System/Volumes/Update
/dev/disk1s1    236568496 177190416  24677168    88% 2260371 123385840    2%  /System/Volumes/Data
map auto_home           0         0         0   100%       0         0  100%   /System/Volumes/Data/home

Can anyone explain to me what I need to do to download this and get it running again? I guess it is either, find out how much more space I need and clear it out (really just how to determine how much more space I need, what "space" is the issue) or what process I can take to get it running.

Rockwell Rice
  • 3,376
  • 5
  • 33
  • 61

3 Answers3

1

You do not have enough free space to install Xcode. The 10-11 GB file you are downloading is a compressed file. The expanded file is larger than the 17 GB of free space you have. The operating system temporarily needs space to hold both the compressed and expanded versions. You need 4-5 times the size of the Xcode download file to install Xcode. That is going to be tough to do on a 128 GB drive.

The best solution for you is to download Xcode from Apple's developer download site on an external drive. Expand the file on the external drive and copy it to your main drive. By doing this, you don't need as much free space available on the main drive.

Some things you can do to free up disk space on your main drive include:

  • Delete any existing versions of Xcode.
  • Use the DevCleaner app to clean out any caches and old simulators.
  • Restart your Mac.

You can find other possible solutions in the Stack Overflow question Xcode on Mac App Store can't install , show disk space not enough and the following article:

Xcode Installation Questions

Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66
  • One question. I moved this onto an external drive like you recommended. The external hard drive says it has 233.74 GB of free space, and still will not open this .xip file. There is no way it is that large, right? It is xcode 13.3. – Rockwell Rice Mar 22 '22 at 15:07
  • 233 GB is enough space. When you say "will not open this .xip file", do you mean the .xip file won't expand or are you saying you can't launch Xcode from the external drive? Xcode must be on the startup disk to run. Xcode 13.3 requires macOS 12. If the .xip file won't expand, I don't have an answer for you. – Swift Dev Journal Mar 22 '22 at 17:05
  • It tells me there is not enough space to expand the .xip file. It is the same message I got when trying to expand it on the laptop. – Rockwell Rice Mar 22 '22 at 17:06
1

Here's the trick:

  • Create a huge file (~20GB).
  • Then delete it (don't forget to clean up the trash).
  • Unpack Xcode.xip.

To create a very big file you can use mkfile (very slow) or dd. Below is a terminal command that creates the temp_20GB_file file with random data:

dd if=/dev/urandom of=temp_20GB_file bs=1024 count=$[1024 * 1024 * 20]
Alex Nik
  • 759
  • 5
  • 9
  • Thanks - ridiculously, this worked for me (with a 50GB file). Must be something about the new categories of "free" space (time machine etc) – Rowan Sep 14 '22 at 10:16
0

In my opinion, this is the easiest and fastest solution to free up enough space to install a new version of Xcode. Here are a few steps to free up disk space if you've already used Xcode:

  • Go to About This Mac
  • Then go to Storage
  • Then go to Manage...
  • Go to Developer
  • Delete project build caches or some unused SDKs that you no longer use

I will also put screenshots so you can found more easily and see how much memory they take up this unused SDKs.

enter image description here

enter image description here

DJ Djus
  • 13
  • 6
  • Ya tried all that, there is just no way I can erase enough stuff. I couldn't even get the zip file to open on my external hard drive, and that probably has 2 or 3 times the free space. My "developer" area is totally empty. Hopefully this answer might help someone else though – Rockwell Rice Jul 28 '22 at 00:11