Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

swandy

macrumors 6502a
Original poster
Oct 27, 2012
991
323
I have a new M3 iMac and after doing a restore from my M1 iMac, Finder is showing a huge amount (over 120GB) of "purgeable files". And apparently using Crossover to run Battlenet and Steam has issues reading the correct amount of available HD space.
Is there any "simple" way to convince my iMac to make this space available? I have tried restarting the iMac and restarting in Safe Mode but neither made any difference. Thanks.
 
Turn off the "Maximize Storage" option and reboot.
I am talking about my iMac running Sonoma. I have seen that option on my iPhone and iPad, but never on my iMac. Sorry if I was not clear enough - or perhaps you can tell me where to find that setting because I can't
 
I am talking about my iMac running Sonoma. I have seen that option on my iPhone and iPad, but never on my iMac. Sorry if I was not clear enough - or perhaps you can tell me where to find that setting because I can't
 

Attachments

  • Screenshot 2023-11-14 at 3.05.46 PM.png
    Screenshot 2023-11-14 at 3.05.46 PM.png
    87.7 KB · Views: 470
Settings > iCloud > Your Name > Optimize Storage toggle as pictured above.
That setting was already turned ON and it has had no effect on the issue with purgeable files being left by macOS on the hard drive.
 
And do I leave it off? Seems like leaving that off would just have more stuff stored on the internal hard drive.
 
You want to turn it off.
No it’s the other way round.
Optimise OFF forces full size files.
Optimise ON gives macOS permission to replace full size files with pointers if it is getting short of space.
With Optimise ON you can evict files by right click > Remove Download.

The best way I know to do delete purgeable files in bulk is with third party app DaisyDisk.

Local (ie on boot volume) Time Machine snapshots can take a lot of space. They are supposed to be deleted if space is needed by something else, but this doesn’t always happen. You can delete the local snapshots with Disk Utility or DaisyDisk.
 
No it’s the other way round.
Optimise OFF forces full size files.
Optimise ON gives macOS permission to replace full size files with pointers if it is getting short of space.
With Optimise ON you can evict files by right click > Remove Download.

The best way I know to do delete purgeable files in bulk is with third party app DaisyDisk.

Local (ie on boot volume) Time Machine snapshots can take a lot of space. They are supposed to be deleted if space is needed by something else, but this doesn’t always happen. You can delete the local snapshots with Disk Utility or DaisyDisk.
The issue that started this post is that I am running Crossover (so that I can play the two newest Diablo games which have not been released for Mac and Parallels doesn't support Direct X 12 yet) and after installing Battlenet into a Crossover "bottle" I kept being told that I had insufficient hard drive space to install Diablo 4. But apparently a lot of that space was being occupied by my "purgeable files" and Battlenet was seeing them as occupied space and only saw the difference between my available space and the purgeable files.
I did look into DaisyDisk and found it "telling" that if I purchased it from the developer direct I could delete the purgeable files, but if I purchased it from the MacApp store, that ability was not available. You would wonder why Apple insisted that the developer disable that within the app.
 
Is there a safe way to do this without a third party app?

I have like 450GB of purgeable space on a 1TB drive, so it is obviously taking up a lot of space!
 
Here is how I do it, for the last several MacOS versions. Go into the shell, you can use Terminal app provided by Apple and type something like:
$ head -c 450000000000 < /dev/random > ~/Downloads/myfile
Or whatever the total available space is. This will take a longish time and when the boot disk runs out of space, it will abort. Then:
$ rm ~/Downloads/myfile
and now nearly all of the "Available" should be actually usable by anything, and the Purgable should be small.
I have not done this in a while, but seem to recall you have write a file larger than the remaining available space to get back all the "Purgeable."

I do not know of any better way. Perhaps someone can post something easier. This is simple enough you can write a script to just try to write a file the size of your disk, and you could schedule the script to run at 3AM or some time you are surely not using your machine. Then, your pursuable space would be 'purged' daily.
 
Here is how I do it, for the last several MacOS versions. Go into the shell, you can use Terminal app provided by Apple and type something like:

Or whatever the total available space is. This will take a longish time and when the boot disk runs out of space, it will abort. Then:

and now nearly all of the "Available" should be actually usable by anything, and the Purgable should be small.
I have not done this in a while, but seem to recall you have write a file larger than the remaining available space to get back all the "Purgeable."

I do not know of any better way. Perhaps someone can post something easier. This is simple enough you can write a script to just try to write a file the size of your disk, and you could schedule the script to run at 3AM or some time you are surely not using your machine. Then, your pursuable space would be 'purged' daily.

Careful with that, as with every run of this, it greatly increases your number of TBW (Terabytes Written) on your SSD. The lifetime of those things is limited, and doing this daily could bring you into dangerous territory.

You should look into using the "mkfile" command instead, which allocates a big file without actually writing all the individual bytes to the SSD.
 
Careful with that, as with every run of this, it greatly increases your number of TBW (Terabytes Written) on your SSD. The lifetime of those things is limited, and doing this daily could bring you into dangerous territory.

You should look into using the "mkfile" command instead, which allocates a big file without actually writing all the individual bytes to the SSD.
Good point! I should not have mentioned a nightly script since most of us are on SSD now. I was using a HDD system the last time I did this and have not bothered to do this on SSD yet. Even when using HDD, I never bothered with making a script, and happened to do this clearing of the "Purgeable" about once a year, perhaps twice. I just verified with mkfile on my SSD system. I had 414 GB of free space, so the command I used was:

$ mkfile 415g ~/Downloads/myfile

If you simply reserve space with "-n" the purgeable space is not removed. So, no "free lunch" with mkfile. If you want to reduce your "Purgeable" this way, then you need to actually write to your SSD. One would expect (hope) there would be a simple OS command to tell the file system to clear this, but apparently not. Not even on Onyx.

Much of this "Purgeable" is TimeMachine and APFS snapshots, TechTool Pro and perhaps other non-apple utilities can make them. It is good advice to look at your snapshots first before doing this. My experience has shown me sometimes a sizable amount seems to not be just snapshots that I could find. Since snapshots are purgeable, making a large file this way should remove them. So, it would be good to recreate at least one either manually or with forcing a TM backup. A snapshot could save your data, they are there for a reason.
 
  • Like
Reactions: ManuCH
Good point! I should not have mentioned a nightly script since most of us are on SSD now. I was using a HDD system the last time I did this and have not bothered to do this on SSD yet. Even when using HDD, I never bothered with making a script, and happened to do this clearing of the "Purgeable" about once a year, perhaps twice. I just verified with mkfile on my SSD system. I had 414 GB of free space, so the command I used was:

$ mkfile 415g ~/Downloads/myfile

If you simply reserve space with "-n" the purgeable space is not removed. So, no "free lunch" with mkfile. If you want to reduce your "Purgeable" this way, then you need to actually write to your SSD. One would expect (hope) there would be a simple OS command to tell the file system to clear this, but apparently not. Not even on Onyx.

Much of this "Purgeable" is TimeMachine and APFS snapshots, TechTool Pro and perhaps other non-apple utilities can make them. It is good advice to look at your snapshots first before doing this. My experience has shown me sometimes a sizable amount seems to not be just snapshots that I could find. Since snapshots are purgeable, making a large file this way should remove them. So, it would be good to recreate at least one either manually or with forcing a TM backup. A snapshot could save your data, they are there for a reason.

Good to know mkfile doesn't actually trigger the removal. That's quite annoying. I personally remove my snapshots manually, either using Daisy Disk, or then with the following command:

Code:
for d in $(tmutil listlocalsnapshotdates | grep "-"); do sudo tmutil deletelocalsnapshots $d; done

That's usually all it takes.
 
Is there a safe way to do this without a third party app?

I have like 450GB of purgeable space on a 1TB drive, so it is obviously taking up a lot of space!

Purgeable space is often caused by APFS snapshots, like ones created by Time Machine. The snapshots effectively retain files you've deleted (even after emptying trash).

IMHO the easiest way to free up that storage space is to use Disk Utility.

Open Disk Utility. In the left pane, select your boot volume group or your boot volume (but not "snapshot"). Then go to go to menu "View" and select "Show APFS Snapshots".

All of the snapshots on the boot volume will show at the bottom of the right pane. Select the oldest (or all) of the snapshots, and click the "-" button to delete it. Any files that exist only in the snapshot(s) will be permanently deleted and the free space will be restored to your boot volume.
 
The issue that started this post is that I am running Crossover (so that I can play the two newest Diablo games which have not been released for Mac and Parallels doesn't support Direct X 12 yet) and after installing Battlenet into a Crossover "bottle" I kept being told that I had insufficient hard drive space to install Diablo 4. But apparently a lot of that space was being occupied by my "purgeable files" and Battlenet was seeing them as occupied space and only saw the difference between my available space and the purgeable files.
I did look into DaisyDisk and found it "telling" that if I purchased it from the developer direct I could delete the purgeable files, but if I purchased it from the MacApp store, that ability was not available. You would wonder why Apple insisted that the developer disable that within the app.

Because App Store apps must be sandboxed - i.e. only access their own files. Which makes sense generally but not in case of Daisy Disk which needs to access every file to ... do it's job. You'll see when it scans that the app store version simply shows you less system ish files because it can't access the rest.

If you don't want to buy directly, you can buy DD on the app store and then get the standalone version from them somehow. I forget the mechanism but that's what I did.

It's a great app, I use it like twice per year on all my Macs and it always finds crap I forgot about taking space on my machines :)
 
  • Like
Reactions: Ben J.
No need for an External Tool as usual.
As you can do it in the Terminal there is an easy way using Disk Utility:
(Snapshots get also deleted after TM Backup / they are also useful for undo in Finder)

Delete an APFS snapshot
  1. In the Disk Utility app on your Mac, choose View > Show APFS Snapshots.(
    1714467061599.png
    )
  2. In the sidebar, select a volume. The APFS snapshots for the selected volume are listed in a table at the bottom of the window.
  3. Select one or more snapshots in the table, then click the Delete Snapshot button .
1714467027236.png
 
I ended up biting the bullet and got Clean My Mac, which gave me back like 300GB of "purgeable" storage!
 
Purgeable space is often caused by APFS snapshots, like ones created by Time Machine. The snapshots effectively retain files you've deleted (even after emptying trash).

IMHO the easiest way to free up that storage space is to use Disk Utility.

Open Disk Utility. In the left pane, select your boot volume group or your boot volume (but not "snapshot"). Then go to go to menu "View" and select "Show APFS Snapshots".

All of the snapshots on the boot volume will show at the bottom of the right pane. Select the oldest (or all) of the snapshots, and click the "-" button to delete it. Any files that exist only in the snapshot(s) will be permanently deleted and the free space will be restored to your boot volume.
bumping an old thread to say thanks. Knew that backups may have something to do with purgeable space not releasing. This method worked great.
 
  • Like
Reactions: Brian33
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.