55

I cleared space on my disk by deleting files and emptying trash. But, I am unable to make use of the space that I freed up. That is, as you can see the disk reports 142 GB as Available with 83 GB of that as purgeable.

Available vs Purgeable disk usage

So I should have plenty of space to to copy over a 70 GB file onto the disk. Yet when I try I get an error stating "Not enough disk space to copy", like the following image shows:

enter image description here

How do I clear out the purgeable space to make it truly available for use?

I've tried rebooting in the hopes that a restart clears out the purgeable area, but had no change trying that.

8
  • 2
    I believe the disk space marked 'purgeable' is already counted in your available disk space. It's space that the system will delete automatically if it's needed so deleting it will not increase your 'available' disk space. See this article about Optimized Storage.
    – fsb
    Sep 26, 2016 at 19:28
  • 8
    @fbara yes, that is my understanding too. Yet, with 142GB Available I can't copy over a 70GB file. So, purgeable is stopping me from copying files over.
    – Josh
    Sep 26, 2016 at 19:38
  • 1
    Can you make the adjustments indicated in that article to clear-out some of your purgeable space?
    – fsb
    Sep 26, 2016 at 19:53
  • 3
    The article speaks to ways to free disk space. I've already cleared out 140GB of space. The problem is that even with 140GB of free space I couldn't copy a 70GB file.
    – Josh
    Sep 26, 2016 at 20:47
  • 3
    here is what I did Turn off file optimization: iTunes, images, icloud, etc. You can uncheck the options in the app themselves. discussions.apple.com/message/32393627#32393627 use command to find all local timemachine snapshot tmutil listlocalsnapshots / Produces this: /Users/<yourusername>$ tmutil listlocalsnapshots / com.apple.TimeMachine.1977-04-16-144528 com.apple.TimeMachine.1977-04-16-154756 com.apple.TimeMachine.1977-04-16-164937 delete one by one: tmutil deletelocalsnapshots <snapshot_date> example: tmutil deletelocalsnapshots 1977-04-16-144528 May 4, 2018 at 19:27

6 Answers 6

10

Another option to flush purgeable disk space is to manually create empty disk images, either from Disk Utility (with Cmd+N) or from the terminal, like this:

$ hdiutil create -size 25g empty.dmg
created: /Users/enekoalonso/empty.dmg

This command takes a few seconds, using the default image parameters.

As a note, we cannot create an image larger than the free space available, but using a value close to that will trigger macOS to release a good amount of purgeable space.

This process can easily be repeated as needed, until almost all purgeable space has been released.

3
  • 1
    My data volume is showing "Available: 37.15 GB (24.49 GB purgeable)" yet $ hdiutil create -size 25g empty.dmg errors with hdiutil: create failed - No space left on device
    – swrobel
    Sep 20, 2021 at 18:52
  • @swrobel have you tried with smaller sizes? like 20gb or 10gb? Sep 26, 2021 at 2:19
  • yes, I have tried smaller sizes
    – swrobel
    Sep 27, 2021 at 18:53
47

You can create a huge file that will force macOS to clean purgeable files to free you space. Do do so, type this command in a terminal:

dd if=/dev/zero of=~/hugefile bs=15m

It will create a file called hugefile in your home folder, which you can check the size with Get Info and stop when it's big enough for you, using ControlC. Or you can simply let it run until you are out of space in the disk and things start to stop working.

This command takes a long time to allocate the memory, you can also stop it when it's 5~10GB and duplicate the file CommandD to create copies and speed up the process.

Then, you just need to delete the files, obviously.

In your case, you already have the file you want to copy, so you could split it into 50 GB chunks and copy one chunk over. Then let the system purge files and repeat. Once you have all the data over, you can combine them - adding the second file to the first, deleting the second file, etc...

The main problem is that “purgeable” space is not one monolithic item - it is potentially local time machine or filesystem snapshots, cached data, derived data, iCloud photos at full resolution that will be downsampled as you start to get closer to no free space available.

The system will self correct if you can bring the data over in two pieces in your case, or in n-pieces in the general case.

7
  • 5
    That worked for me. I did find a faster method to create the file though, at osxdaily.com/2013/05/31/create-large-file-mac-os-x
    – CharlesW
    May 12, 2018 at 13:00
  • 5
    I used the Disk Utility method to create a 10 GB file and it was very quick.
    – SPM
    Aug 9, 2019 at 4:49
  • /dev/zero is a bit faster than /dev/random. superuser.com/a/359601/167657 And apparently random isn't more secure than zero these days.
    – the
    Aug 21, 2019 at 22:06
  • 1
    Nothing worked, using Mojave / AFPS disk. Until I tried @SPM 's suggestion - it did the trick. I created a 40 GB AFPS image using Disk Utility. Then deleted it. It cleared out all purgeable space.
    – Jonny
    Oct 8, 2019 at 5:26
  • 6
    You might need to run dd if=/dev/zero of=/Users/<your_username>/hugefile bs=15m if you get a dd: ~/hugefile: No such file or directory. Run pwd in your home directory to get the full path name for it
    – tpei
    Dec 18, 2019 at 11:42
24

If time machine is the taking the space, than using tmutil can help. List of snapshots can be checked using:

tmutil listlocalsnapshots /

And cleanup upto 100GiB using:

tmutil thinlocalsnapshots / $((100 * 1024 * 1204 * 1024)) 4

Last two arguments are:

  • amount of space to try to reclaim (using $(( )) to calculate 100 GiB)
  • urgency, 1 is default, 4 is highest (didn't find better description)

There is a mention of tmutil in a comment, but not of thinlocalsnapshots.

3
  • I run this twice and the usage went down from 80% to 40%. Thanks a lot.
    – erny
    Nov 5, 2020 at 14:07
  • This was the only thing that allowed me to start my Windows Parallels instance
    – bobbyg603
    May 27, 2022 at 20:43
  • this worked brilliantly to remove the purgeable data from my mac
    – Andrew
    Mar 9 at 22:45
8

I was able to cause the purgeable area to get cleared by copying over temporary smaller files which eventually caused the purgeable space to be cleared. Once the large purgeable area was cleared then I could delete the temporary smaller files and copy the large one that I intended.

Note, that deleting the smaller temporary files caused my purgeable area to grow again, fortunately it grew small enough that I could copy the large file over. Hopefully Apple refines this over time.

4

There seems to currently be no way of getting a list of what the OS considers purgeable files in order to delete them, but there are some candidates to consider, such as cached files.

This particular file can grow quite large, and once removed reduces the purgeable data size;

/System/Library/Caches/com.apple.coresymbolicationd/data

To get an idea of the size of the file, you can run ls as the sudo user;

sudo ls -la /System/Library/Caches/com.apple.coresymbolicationd/data

A search for the file provides a few links to queries on its size, such as this Q&A here.

Details on the file itself are scarce, but it seems related to symbol lookup for crashed and problematic processes; as is evidence in this linked Q&A, with more information this post. Follow on the Q&A linked above, it does seem safe enough to delete, this file.

Removal of the file would need to be done with sudo, details are provided in the Q&A post. The gist of it is to move (as sudo) the file to somewhere in your home directory (e.g. ~/Documents/SymbolDataDelete), reboot the machine and then delete the file.

Note: the symbol file will be created again, this appears to be normal, but you should be able to better manage the size it consumes if it becomes too large.

Warning: using sudo can be dangerous... use with care.

On the expected results; I don't anticipate that this single file will be the sole contributor to the purgeable data (assuming the cloud drive is off etc.), but it did clean up about 95% of the purgeable data I had.

General observations

It may seem obvious, but a reboot cleans out a lot of the temporary and cached content. Give it a few minutes after the restart. Personal observations have been that after a couple of weeks, a reboot cleans up in the order of a gig of purgeable space...

1
  • actually there is: tmutil listlocalsnapshotdates then tmutil deletelocalsnapshots to delete them (start with oldest date) Feb 11, 2021 at 14:56
-1

Final step which worked (using Catalina 10.15.7 on an iMac with an APFS formatted Fusion Drive)

  • Confirm that a recent backup is available for the system before proceeding to reduce the risk of losing data.
  • Boot to recovery mode and reinstall the Operating System. See How to reinstall macOS from macOS Recovery. Do not erase or format the disk.
  • Once the reinstallation was complete, the purgeable storage was substantially smaller and operations which previously failed due to insufficient disk space succeeded.

In this scenario, an iOS device backup to a Mac was failing and it succeeded after the reinstall of the OS.

Other steps taken prior to reinstallation, which might not be required

You must log in to answer this question.

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