Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Purgeable Space Recovery

My Lightroom Main Library became corrupted by some unknown bug in Lightroom. I have backups in multiple forms so I can recover with minimal data loss. I first deleted the Lightroom Main Library files (~450 GB on a 1 TB SSD internal boot drive). Before deleting the files, I had approximately 200 GB of free space. This deletion should have left me with ~600 GB of free space. I tried to copy the backed up version of the Lightroom Main Library to the boot disk. I got an error message telling that I needed an additional 250 GB of free space to enable the copy.


This was insane. I spent 3 hours trying to understand this. I finally noticed that in DiskUtility, it told me that I had ~200 GB of free space and 450 GB of "purgeable" disk space. I have spent another long period looking for how to free this purgeable space. I do not want all the old corrupted files to be copied to iCloud. I do not want any files automatically copied to iCloud other than the ones I have already assigned there.


What is going on? I played around with turning off optimization of file storage. I finally tried to use the storage tab in about this mac to manage the file space. Some set of operations I performed finally allowed the file copy to start. What is going on? I do not want or need purgeable files without an explicit way to purge them. I am a full-time software engineer with 45 years of experience. What is going on here?


Make this work in a reasonable way under my control. What is the simple solution to purging "purgeable" space. A simple command is required. Even if it is in terminal. Just tell me.

MacBook Pro, macOS High Sierra (10.13.6), (15, Mid 2012) + 1TB SSD boot disk

Posted on Jul 14, 2018 7:26 PM

Reply
Question marked as Best reply

Posted on Jul 14, 2018 9:09 PM

Hi,


In High Sierra, the management of purgeable space is henceforth entirely controlled by the system. You can however try to recover some space by deleting the "snapshots" made by the APFS file system (basically: states of your workspace at a time/hour given, very similar to Time Machine, but local) (this can easily grow up to something delirious, particularly if at a time/hour given you had various gigantic files present in your workspace...) (video editing, for instance) (yet again an activity that one will be soon unable to practice on macOS...) (if these files are no more there, the space is however still occupied, but by their snapshots...). So...


Copy/paste the command below in your terminal, and type Enter.


tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done


(wait a bit, this will take some time...) (as you know, but for the others: when you see the cursor back, it's done)


You can notice immediately the effect on your disk space, but it's better to restart just afterward. Like this, the file system will create a new "snapshot" corresponding to your workspace state. You can now work safely in your workspace while APFS creates regularly new snapshots of your workspace.


You may have to do this procedure every time you have deleted very big files.


Regards.

3 replies
Question marked as Best reply

Jul 14, 2018 9:09 PM in response to John Mcalister1

Hi,


In High Sierra, the management of purgeable space is henceforth entirely controlled by the system. You can however try to recover some space by deleting the "snapshots" made by the APFS file system (basically: states of your workspace at a time/hour given, very similar to Time Machine, but local) (this can easily grow up to something delirious, particularly if at a time/hour given you had various gigantic files present in your workspace...) (video editing, for instance) (yet again an activity that one will be soon unable to practice on macOS...) (if these files are no more there, the space is however still occupied, but by their snapshots...). So...


Copy/paste the command below in your terminal, and type Enter.


tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done


(wait a bit, this will take some time...) (as you know, but for the others: when you see the cursor back, it's done)


You can notice immediately the effect on your disk space, but it's better to restart just afterward. Like this, the file system will create a new "snapshot" corresponding to your workspace state. You can now work safely in your workspace while APFS creates regularly new snapshots of your workspace.


You may have to do this procedure every time you have deleted very big files.


Regards.

Jul 15, 2018 7:18 PM in response to Almojgar

Thank you for your response. The problem went away before I tried the procedure but I have archived it for future reference.


I simply do not understand the (il)logic of this behavior. If I delete a large file (or set of files), I want that space to be available to me. I do not have time to futz around waiting for some set of procedures determined by a systems programmer to transpire and free my space. I am a professional working on timeline. Processing photos is a time and space intensive activity. I will always be using and freeing large amounts of disk space.


I know (or at least presume) that this is not your decision. However, I hope that someone at Apple is at least monitoring these channels and want them to understand my concerns.


Best regards and thank you for your response,

John

Jul 15, 2018 7:46 PM in response to John Mcalister1

It's not my decision, at all, actually, as — like most of the people who use this forum — I'm not Apple (corporate) programmer. We are Mac users like you, some here since the veeeeery begining of this (cough) magnificent story.


Incidentally I'm photographer and cineast, and that APFS file system, added to the programmed abandon of support for Aperture, and these constant difficulties to get at last a stable and fluid system, gives me flushes of anxiety. So I understand perfectly well your concerns...


Best regards to you.

Purgeable Space Recovery

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.