Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode on Mac App Store can't install , show disk space not enough

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)?

enter image description here

enter image description here

like image 531
dickfala Avatar asked Oct 18 '22 00:10

dickfala


People also ask

Why does my Mac say I don't have enough disk space?

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 disk space do I need for Xcode?

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.

How much space does Xcode 13.2 take?

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.


Video Answer


2 Answers

What you can also do is manually download Xcode and install it. (Without using the app store update) Therefor do the following steps:

  1. go to https://developer.apple.com/download/more/
  2. search for Xcode (or latest version e.g Xcode 10.2) and manually download and install it.

See also this post here: https://discussions.apple.com/thread/8622103?answerId=250008933022#250008933022

like image 134
Biba Avatar answered Oct 20 '22 13:10

Biba


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..

like image 122
Le Hibou Avatar answered Oct 20 '22 14:10

Le Hibou