2

Today I want to install Catalina but it requires 17 GB of disk space, and I only have 8 GB. So I started to delete files but only found out that the disk space was unchanged or even shrinked more after deleting.

I just delete files either by moving the files to Trash and empty it, or rm -rf. The files are both on local and iCloud.

I deleted at least 40 GB files but the available disk size is still about 8 GB. Why is it happening and how can I gain the disk space?

I restarted a few times but it didn't work...

(This question is not about the external drive.)


enter image description here

I found that there are awkward files under ~/Library/CloudStorage/iCloud Drive, and how many times I delete them these files show up again under this directory.

All of them seem to just a few bytes files according to the Finder information, but deleting them takes a few minutes per one file.

  • are the deleted files in icloud also? – jmh Jun 18 at 23:28
  • @jmh yes and no. Some files, like Xcode, are only in local but the disk space is not released. – Blaszard Jun 18 at 23:29
  • Have you tried deleting the files from icloud. – jmh Jun 18 at 23:30
  • @jmh yes, and I opened the iCloud Drive from Finder and deleted them. – Blaszard Jun 18 at 23:31
  • 1
    @jmh There was 8 GB before trying to install. On the install dialog, I was informed to need another 9 GB, so I started to delete files. – Blaszard Jun 18 at 23:43
1

Did you try clearing Purgeable Space on your Mac? If not, you can follow these steps to remove Purgeable space on your Mac running Sierra or Mojave:

  • Open the Terminal application in Applications/Utilities.

  • Enter the following into the Terminal window to start making a file that will
    grow until the disk is full: dd if=/dev/zero of=~/stupidfile.crap

The command will create a file called stupidfile.crap in your Home directory and fill it with zeros. During the creation of the file, you will get a lot of warning messages that the disk is full. Just leave it there, because if you close it, it will reappear after a while.

When the Terminal window command ends with the message “No space left on device,” the disk is full, and mission accomplished. Mac OS should now have removed all the Purgeable space from the drive. Don’t forget to empty the trashcan to regain the space.

Source: https://www.jackenhack.com/mac-os-remove-purgeable-high-sierra/

If it doesn't help, OmniDiskSweeper http://www.omnigroup.com/more may also help you identify where the space is going. Good luck!

  • Do you take any precautions as you fill your disk with stupid crap (I love the naming) like disconnect from the network so you don't break a iCloud download or sync or just "let-er-rip!" and hope the system remains responsive enough to cancel the operation cleanly? – bmike Jun 19 at 11:04
  • 1
    Hi, yes, it seems like a good idea to disconnect from the network. I tried this on my Macbook running High Sierra. My system did become slower, and I got couple of warnings. I didn't close any warning messages and all went well. – Charles S Jun 19 at 11:10
  • That's excellent. I would be chicken to do that on my important computers, but for science on a test Mac... Mind if I suggest a light edit? You can roll back or further edit if mine aren't to your taste. – bmike Jun 19 at 11:27
  • Hi bmike, please don't hesitate to suggest a edit. I'll accept it right away! – Charles S Jun 19 at 11:40
1

On the assumption that you have APFS file system, macOS 10.14 Mojave, and local snapshots - the system might take some time to purge the space.

The way to know this would be to open the system information and give it several minutes to catalog all the space into buckets.

Second - check for local snapshots

tmutil listlocalsnapshots /

There are command line options to force a purge of APFS snapshots:

tmutil thinlocalsnapshots / $(echo "10 * 1000000000" | bc) 2

If you don't have these, I would suggest making sure you have a good backup and restart to recovery mode and run a disk check to be sure the accounting / filesystem are in good shape.

The next thing to do would be to turn off iCloud and let all those files exist only in the cloud. This will prevent a local storage taking space.

Once you install the upgrade, you can turn on iCloud again and only download the files you need locally.

  • In my answer the $(echo "10 * 1000000000" | bc) calculates out 10 GB and the 2 raises the urgency of the “delete” from the default value. You could just do tmutil thinlocalsnapshots / 500 2 several times until you see the space free you desire. – bmike Jun 19 at 0:06
  • Thanks but I don't use Time Machine. I just tried to log out of iCloud but it keeps shrinking, and now I only have 6.7 GB available... It's very awkward. – Blaszard Jun 19 at 1:04
  • You still could have snapshots @Blaszard I’ve edited my answer, but we’ll need you to dig into what’s actually using space if my guess wasn’t on the nose. – bmike Jun 19 at 1:28
  • I don't have snapshopts as I have never backed up my disk. (I have no means to back up actually). I updated my question as I found another strange behavior. How do you think about it? – Blaszard Jun 19 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .