skip to Main Content

I am trying to update XCode from 11.2.1 to 12.4. I installed XCode from the app-store, so I am trying to update it from there itself.

I have 27 GB of free space, but every time I try to update, it says I do not have sufficient space.

enter image description here

I don’t think there is anything else I can delete. I removed the deviceSupport, derivedData, archives, unavailable simulators etc. I am on MacOS Catalina 10.15.7. This MacBook only has 128GB hard drive.

Without updating XCode I can’t run My iOS 14 test devices with this.I dont need the latest version, just the version capable of running iOS 14 devices.

How much space does this XCode consume? How can I update this?

8

Answers


  1. Chosen as BEST ANSWER

    All the above answers are correct and gave me a good move. However it was impossible for me to clean 40-50 or more gigs from my laptop.

    I purchased a new MacBook M1 Pro 256GB laptop. However now I am following the below to keep more space available.

    1. Install only most wanted software. I have multiple laptops, two macs and one windows. My windows PC has all the software I need. my old MacBook is now for Java based developments, emails, docker and so on. My M1 Macbook pro is only for XCode and Flutter, mobile based stuff.

    2. I installed a XCode cleaner, downloaded from app store. I think I had to buy that.

    3. My macbook do not have lot of other files now. I store them in cloud. When needed I download them and edit. Otherwise they will be handled in Windows PC where I have 1TB and more.

    ADVICE: IF YOU DO DEVELOPMENT STUFF IN MAC, BETTER BUY A PRO WITH AT LEAST 256GB IN IT!


  2. This is pretty much everything you can do:

    1. Check if you cleared all possible garbage that Xcode stores (blog post).

    2. Free some disk space by deleting other programs/junk.

    3. Completely reinstall Xcode.

    4. Completely reinstall macOS to wipe your whole disk.

    5. Time to buy a new Mac I guess?

    Login or Signup to reply.
  3. I have faced this issue many times, so in search of this I found that newer version of xcode requires around 35-40 GB of free space to get updated. In 27 GB it would never get updated. so after removing all junk you can do following steps.

    1. remove derived data , unnecessary Simulators.
    2. there is folder of xcode cache in xcode you can remove that (this takes more space, in mine it was 10GB)
    3. if you are left with 1 or 2 GB restart your mac this would work.
    4. if you have come to this step this means nothing worked so best solution is after doing above 3 steps uninstall the xcode and install it again.

    P.S : I have tried all this steps twice to update my xcode as I also have 128 GB storage only,

    Login or Signup to reply.
  4. You can manually download your desired Xcode_12.4.xip file from
    https://developer.apple.com/download/more/

    Here I faced so many complexity with space issue. However by following steps Finally I installed Xcode_12.4

    From terminal this command will expand the Xcode. but it will expand in your home dir

    xip --expand Downloads/Xcode_12.4.xip
    

    For Application directory installation , you have to go Application directory first.

    cd ~/Applications #otherwise, will unpack into home dir
    

    then run this command in terminal

    xip -x ~/Downloads/Xcode_12.4.xip
    
    Login or Signup to reply.
  5. Xcode 12 need about 25-30GB to unpack. I had to free about 42GB for the app to download from the App Store. I strongly recommend OmniDiskSweeper(free). It removed about 32 GB of unnecessary data on my 128GB MBP.

    Login or Signup to reply.
  6. If the xip command fails is because there is not enough space in the startup Disk because of the time machine local snapshots. Do this:

    1. Disable time machine while this process finish
    2. You have to delete local snapshots of time machine

    tmutil listlocalsnapshots /

    then delete them:

    sudo tmutil deletelocalsnapshots

    add one space and the date of the snapshot like: 2021-06-24-201254

    if all is ok you will get a message like this:

    Deleted local snapshot ‘2021-06-24-201254’

    1. Now you can execute the xib and will work (I hope so…)
    Login or Signup to reply.
  7. You need at LEAST 1TB of boot drive to do Xcode projects! Especially, like me… if you also do graphics, video and music and other stuff, I do with FCPX and Garage Band, Logic Pro with lots of filters and all the loops!

    Login or Signup to reply.
  8. You can automate it by scheduling a cron to delete all local snapshots at a mount point.

    I have a cron job that executes every 30 minutes to delete all snapshots from my root directory

    ‘*/30 * * * * tmutil deletelocalsnapshots /’

    30 minutes is probably a little excessive but ensures my local space is available when needed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search