I'm using macOS to install Xcode 10.1.
I have 18.43 GB free disk space on my Mac, but when I click the install button next to Xcode in the App Store, it always shows the "Not enough storage disk space, you can't install the product" alert message.
How do I fix this problem in macOS Mojave(10.14.1)?
Your Mac's hard drive probably has temporary files you don't need. These files often take up disk space for no good reason. Mac OS X tries to automatically remove temporary files, but a dedicated application will likely find more files to clean up.
How much space does Xcode need? On the App Store page for Xcode, it lists the size of Xcode 12.5 as 11.7GB. However, when you try and install it, you'll get an error message unless you have at least 40GB of free space.
The closest I could get to an answer was the comment about Xcode 13.2. 1 to this answer which says 45 GB needed to install, presumably using the AppStore though. The top answer to QA you linked says it now needs 49GB.
What you can also do is manually download Xcode and install it. (Without using the app store update) Therefor do the following steps:
See also this post here: https://discussions.apple.com/thread/8622103?answerId=250008933022#250008933022
Check the "purgeable" space of your APFS disk with Disk Utilities.. It seems Finder count this space in free space, but not App Store..
But you can trick macOS to clean up APFS by creating a huge garbage file, then deleting it.
To create the file I used the command:
dd if=/dev/zero of=/Users/<username>/hugefile bs=100m
letting dd run for about 30 seconds, then killing it with ctrl+c, and deleting the file:
rm ~/hugefile
Then App Store happily installed update..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With