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

后端 未结 30 1776
执念已碎
执念已碎 2021-01-29 18:33

I\'m using the Mac OS to install the XCode10.1.

I have 18.43GB free disk space in the mac,

but when I click the install button on the Xcode from the app store,<

相关标签:
30条回答
  • 2021-01-29 19:12

    TL;DR: Deleting XCode (~7GB) and then the folder Users/[insert your mac username here]/Library/Developer (~90GB) freed around 100GB. I then installed XCode off of the App Store and it worked like a charm.

    The answers above, such as rm hugefile did not work for me because I guess I had a legit memory issue. Downloading the XCode file and manually installing did not work because I still got the space/memory error.

    I had about 10GB of free space according to Disk Utility.

    Deleting XCode (I had it prior but had to update it) and other applications brought me to 17-20GB.

    Still didn't work.

    I had to go into the Users/[insert your mac username here]/Library/Developer and I deleted that directory, which I guess somehow saved XCode crap even though I deleted the application.

    That brought me to a stunning 120GB.

    120GB.

    That is half of the memory on my hard drive.

    ?!

    No idea how that works.

    I then installed XCode directly off of the App Store and it works like a charm.

    I guess be careful because I am not sure what is in that directory.. It did not seem important and all seemed XCode-related. It looked like simulators for XCode and other XCode related stuff. I am not sure. I use XCode A LOT so maybe error logs or usage logs built up. Even then - that's just text. So I am not sure. If I run into any weird issues that might result, I will post it here, but so far nothing.

    Also, I highly recommend OmniDiskSweeper, which is a free program and is how I figured this out (among other memory-related issues in the past)

    0 讨论(0)
  • 2021-01-29 19:12

    Uninstall completely Xcode.

    Then install again from the App Store.

    This worked for me.

    0 讨论(0)
  • 2021-01-29 19:13

    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=~/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..

    0 讨论(0)
  • 2021-01-29 19:13
    1. Quit App Store
    2. Delete both storedownloadd and storeassetd from ~/Library/Caches/
    3. Relaunch App Store
    4. Try again

    The above steps resolved the issue for me.

    MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)

    macOS Mojave Version 10.14.6 (18G87)

    0 讨论(0)
  • 2021-01-29 19:13

    I was literally at the same number today. I was able to download once I got my free space just over 20GB.

    The issue for me was my Archives on some larger projects were taking up too much space. I will have to do a better purge, but just removing the failed uploads was enough to lower the system space and download the latest Xcode.

    Here is a great link that explains this in further detail, as well as Simulator Cleanup and Derived Data.

    Free Up Mac Storage

    Sadly when I bought my Mac, I wish someone had told me to get over 250GB of space. All the recommendations said the 125GB was fine for running Xcode. Alright for learning iOS, but I guess they failed to evaluate large long term development.

    0 讨论(0)
  • 2021-01-29 19:14

    I ran into same issue trying to install XCode 11.beta after installing macOS Catalina. What i did:

    1. delete ~/Library/Caches/storedownloadd
    2. delete ~/Library/Caches/com.apple.appstore
    3. uninstall previous version of XCode (10.3) -> wait till all the files are deleted, can check in Disk Utility
    4. fresh restart -> without opening the apps before restart
    5. install new XCode version with Archive Utility.
    0 讨论(0)
提交回复
热议问题