Home > Mobile >  trying to reinstall xcode. Keep getting told not enough space even though there is (I think?)
trying to reinstall xcode. Keep getting told not enough space even though there is (I think?)

Time:03-22

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.

CodePudding user response:

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

  • Related