"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!

I try to clean all XCode caches by this app.
https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12

And it work.
Thank for Konrad Kolakowski
Same problem here! I've got a Mac Mini 2018 with 128gb, which had 17gb left but it still gave me that error message. I only use it for Xcode, so there isn't any random data, apart from a couple of images, which include a single wallpaper and small-ish test files.
I deleted a bunch of pre-installed apps(like Garage Band and iMovie - these were at least 5gb) and also a lot of simulators (no idea why they even existed) and two old iOS versions.
Now there are 40gb left but it still displays the same message!
I even installed DaisyDisk but there's nothing more I can delete without deleting Xcode itself! The download for Xcode 12.4 is only 11.6gb! This is ridiculous!
Update:
Yesterday I also downloaded the "Big Sur" update, which was about 13gb but apparently "only" uses 12gb according to "applications". After the download was done the app store let me start the Xcode update just fine (had to pause it, so not installed yet).

But now the OS update complains that it needs more space! I emptied the trash cash (mostly small files) and now there are almost 32gb left but it's still complaining! There isn't anything else that I can delete! I've also got a Win 10 PC with a 128gb SSD and there's a ton more data/apps on it but I've never had a problem like this with it, not even while updating from Win 7 to Win 10! *** is going on with these updates?!
Never mind, now all of sudden both updates complain and it won't let me start either of them!!! I even cleaned the damn Firefox cache to free some space!
I had the same problem. After downloading Xcode_12.5_beta_3.xip , I was not able to open it due to not enough space although I had ~30 GB but it turns out it requires +40 GB free space.
Once you have 40 gig plus space Xcode will install
Hey!

I have been facing the same problem on my 2017 MacBook Air with 8GB of RAM and 128GB of storage. I have 38GB of storage whereas Xcode only requires 11GB. What I did was I went to the developer website and downloaded the zip file from there. Now, it works perfectly! Here's the link: https://developer.apple.com/download/more/


solved it by removing xcode projects cache and build indexes from Storage Management -> Developer.

Simial problem with my Mac book air 2014 with 30 GB free. Find some cache for old devices in xCode and delete them. Now + 10GB and update is going. alternativly use app by Kolakowski. It does the same job. https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12

Very sad to see that 40GB needed to install 5GB.

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

I am at MacOS 11.6 and trying to install XCode 13 that says its size on disk is 11GB only but I had to clean more than 45GB on disk to get it to start installing. 46GB worked for me.

I had this same problem. Apparently I had time machine partitioning my drives without really knowing. I am a total noob when it comes to macs as this is my first mac book. Anyway, the file system is VERY different than windows and I had no idea that I really only had 25GB of free space left and was only really using 60 GB.. the rest was all time machine back ups. This was what was preventing me from downloading xcode. I saw a few of the comments here and downloaded daisy chain. You will have to pay for the licensed version, to do what you need to. So, I tried daisy chain and it is so easy to use and not only is my mac much faster but I am also after 3 days of trying to download xcode. Just make sure that when you go into daisy chain you click on the purple areas and that will lead you to the time machine back ups that you need to remove.

I also tried this command and it work beautifully.

tmutil thinlocalsnapshots / 21474836480 4

My Environment: Macbook Air-Big Sur(11.6)

Problem #1: I have 32 GB available on my Mac, but still, I couldn't install XCode 12.5.1 because of no space.

Solution: Got an External Hard Disk from my Friend(Support only NTFS-Windows file format), copied the .xip (11GB) file and tried to extract it.

Problem #2: Since the external hard disk support only NTFS format I couldn't paste or extract the file in it. Solution: Installed (https://www.paragon-software.com/home/ntfs-mac/) NTFS for MAC and after successfully installing & Restart I can able to copy and extract the file.

After a couple of attempts, I can successfully extract and copy the Xcode to my MAC and it's working fine.

For Xcode 13.2.1 even 40GB was not enough. At 46GB (remember to purge purgeable storage space) it finally installed it from App Store.

What worked for me was putting a file in the trash and then emptying it. Seemed like some uninstalled programs were still lurking around behind the scenes.

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

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