"Not enough free space" when trying to install XCode even though there's ~7x more free space than required

The title says it all...

I am trying to install XCode, constantly getting that message, no matter what I try. Currently I have 41+ GB free space, XCode requires 6.1 according to App Store.


Please suggest how to solve this issue.


Thanks a lot in advance!

Post not yet marked as solved Up vote post of errata Down vote post of errata
187k views
  • Me also getting same problem whenever I try to update Xcode. At least it should show update size of any app. It doesn't show update size for any app in App Store. How can we know which update is consuming how much data? If it explicitly asks that I want exactly this much of space for installing updates then we can do something about it. Without showing update size it simply goes on asking for more space for whatever free space we provide. Anyway this problem was encountered when I updated from

    Catalina 11.15 to Big Sur 11.0 (trouble moving Xcode from 12.4 (12D4e)) to 12.5

Add a Comment

Replies

I had the same issue, and I fixed it through a pretty simple solution.

Extracting through an External Hard Drive is possible, but I didn't have one. I only had a 16GB pen drive.

My MacBook had only about 30 GB of space. I moved my Xcode file to the 16GB pen drive and I got more space to work. (Which is about 40 GB).

But here, there's another issue. I couldn't extract in the pen drive either.

The Archive Utility has the option to change the path, where it should be extracted. (In the Archive Utility Preferences) So I changed the path to Macbooks Downloads (Can place which ever location) and extracted from the 16GB Pendrive. It didn't show the not enough space warning this time, and worked perfectly.

Later I moved the extracted Xcode file to Applications folder.

Try this method, May worked for you too.

I have been able to download it to a pendrive, and "unzip" it there. Result:

  • Xcode_13.3.1.xip: 10.84 GB
  • Xcode.app: 36.36 GB

At least with this trick I can now move the app to my disk without the need of the extra space to download and unzip it.

you can try this force quit all the app, except [finder] >>> open app store >> now update or install

worked in my case.

The best solution to this stupid Apple situation is to install app "DevCleaner" which offers to delete many GB of Xcode (probably files and caches from simulators - I got 4-6 GB more space; builded archives I did not want to delete but app offers it too). It is really shame on Apple that I can not upgrade 12 GB app with 40 GB free disk space (maybe it time to offer external disk to store new installation files of xcode to save space). Soon I will have to throw my MacBook with 120GB disk to trash because of hungry Xcode upgrades. I just have in macbook Xcode and Chrome. I had to remove anything else bigger than 100MB due to hungry and nasty xcode. Many pre-installed bloatware apps like Music, TV, Mail, Maps, Books and many other can not be removed to free space.

Had the same issue. Though it is related to not enough space (7GB needed) Cleaner 30GB, still the same error

Solution :

**Restart the Mac. **

Then it recognized the available space. Closing , restarting app doesn't help Probably smart devs, use some kind of cache, and until it is invalidated... nothing helps.

Apple M1, Big Sur 11.5.2

I exhausted all my options and conducted a thorough search, but was unable to resolve the issue. I proceeded to restart my computer once, but the problem persisted. However, upon performing a complete shutdown and subsequently restarting it for a second time, Xcode immediately began expanding. Therefore, I would recommend attempting a proper restart of your computer at least twice as it may potentially assist in resolving the issue.

Okay, after trying to download Xcode from AppStore, I decided to cancel and extract the .xip file directly downloaded,

I made a copy to an external SSD, the issue was I discovered that the version was not compatible with my current macOS version, so I decided to cancel the copy.

That was the mistake. I downloaded again but now, the compatible version. I extracted and moved the app to the external SSD.

After hours trying to understand why after moving the app my storage was drastically down from 78GB to 40GB found the AppStore download was not deleted. Plus the "cancelled" copy was also not successfully cleaned up.

open $TMPDIR/..

Then I previewed all 5 dirs and discovered ~35GB in use. That finally resolved the abrupt change of storage. Hope it helps someone.

So I had the same problem like you all. I wanted to install Xcode 14.3. I tried both from Appstore and online from developer.apple.com . I also got the error with not enough space. Here is the solution that I found online:

You have to run the following command in terminal to create a file with multiple GB in size:

mkfile -n [SIZE FOR EXAMPLE 20g] FILENAME

After you create this file you simply have to move it to the bin and than empty the bin. For me this worked if I tried to install Xcode after that. I don't know why because the article for it costs money. But you can read it up here:

https://medium.com/geekculture/installing-xcode-with-not-enough-disk-space-available-b96c8f17115b