Forum

Is there a way to easily find "purgeable" files?  

  RSS

0

Recent versions of macOS have started reporting storage values in some places by taking account of "purgeable" files. I have a reasonable idea of what types of files fall into that category but no explicit knowledge of exactly which files, nor whether that purgeable space will be automatically made available if needed.

I'm looking at a particular instance this morning where I have an SD card that I use for slow access files for my MBP and which is (definitely) not my boot drive. Supposedly there is about 40GB of purgeable space but that number doesn't match in particular to any specific folder that I can tell (eg. I have 28GB of Library/Application Support/Apple/AssetCache).

a) I can't find any attribute within Finder search for "purgeable" to allow me to search - is there a way?

b) Given this is not the boot disk will there be any auto delete of these purgeable files when needed?

Finder Get Info

PS. It annoys me that the Get Info window doesn't include "encrypted" in its description of the volume format.

Disk Utility

0

What does disk utility tell you for the volume with respect to purgeable?

Disk Utility reports the same stats for capacity/available/used as the Finder info window - so it's not that there is inconsistent values, but initially a little confusing when I see 3rd party apps telling me there is only a couple of GB of free space while Finder (status bar) is telling me there is over 40GB

Finder status bar

2

I entered the following in the terminal and found delete-d(aemon)

iMac:~ alex$ apropos purgeable
deleted(8)               - The purgeable space / cache management daemon

… and that gave me deleted(8) which, as per the man page is has its governing bodies (plists) as it were, sitting at /System/Library/CacheDelete.

Summary of deleted description
deleted is a system daemon that keeps track of purgeable space via registered services.

I would be starting my investigation from here, google and developer.apple.com would be reasonable starting points of course.

I reckon there are daemons working away in other parts of the system making similar or relate memory/space management decisions but deleted seems to me to be the big dog.

The question is a fascinating one.

Relative to the Info Window screenshot, Jason Snell took a stab at it. The article is a couple of years old, unless something dramatic has changed it should prove learned.

By the way, this was fun:

  1. Launch Console and select the computer device from the console sidebar
  2. Open "About this Mac" menu item
  3. Click Storage
  4. Observe "deleted" process suddenly populate the console window in a rather dramatic way

In my case 1444 messages with deleted were spawned.

I am sorry if I am not answering your question entirely and for my sporadic response but I am rather ignorant of this myself. I do hope this kickstarts your knowledge adventure. It's an interesting question that deserves some exploration. I wish I had a little more time to devote to it but I hope there are some bits of inspiration.

Cheers

Thanks Alex, good food for thought - especially whether deleted operates on non-system disks. I'll look more into it when I have some spare time.

I've set the SD card as the location for App Store / iCloud "Content Sharing" so, given that this cache should be managed, there is hope 🙂

But yes, I still definitely want to find a way of getting a list of files or folders that are tagged as "purgeable". 

1

Graham

Below is a screenshot of my 3 or 4 year old MBA which has a fairly small SSD, a space where purgeable data really makes sense. Go to it via About This Mac and then click on manage.

Purgeable Items

It would appear to me that each of the items in the sidebar represent locations where purgeable items exist and I think it is, at least in this location, being used loosely as the list is an interpretation of data that can be discarded without fear or permanent loss because these files can always be recreated later via another download, be it IMAP, App Store purchases or similar, in some cases it may not come back like the items in the trash unless there is a time machine backup. I think you get the idea but I am not sure if this answers the question entirely. Still I would rather put this here because it could be a partial reply. Of course there is ~/Library/Caches as well which I figured was a given but it's best to be vocal about it I suppose.

 
0

I'm just creating more questions.... when I run OmniDiskSweeper on that 128GB SD card it reports that 149.3GB is used!!

In my experience that sort of inconsistency happens when there are hard links - and I suspect the cause of those is going to be the folder with iMazing backups

Omnidisksweeper SSD

This post was modified 3 weeks ago by Graham McKay

I can't account for that discrepancy but of course there must be a reason.

I think I would start by breaking the issue down into pieces. The first thing I would do is to approach the problem by reviewing the Apple Support article.

As an FYI, the screenshot I offered earlier is for my MBA, as mentioned, but as this is a secondary machine that I don't really care about, it has no Time Machine backup ever connected because if it crashes completely I have no personal data loss to worry about. That being said, I came across an interesting thread dated back to 2016, and although it has aged a few years, it has some interesting insights to offer so I recommend you skim through it. What interested me was the connection to purgeable space and Time Machine and an option in the Time Machine System Preferences. When you visit the link, look for this post/comment.


I simply opened Time Machine Preferences, clicked the Lock Icon to unlock and make changes. Then I unchecked the box next to Back Up Automatically under the TM Icon. Finally I restarted my Mac. When I turned my Mac back on to check the storage all the purgeable data was gone which freed up over 70 GB on my SSD. Afterwards I went back into the TM preferences and rechecked the Back Up Automatically box. After restarting my computer a second time I saw that the purgeable data was still gone.


Everyone who came back after trying the above confirmed their related issue as resolved, in other words, the purgeable size was very significantly dropped in size.

Based on these findings I became curious so I looked at the man tmutil and searched for the word "purge" and the following came up at the tail end of man:

thinlocalsnapshots mount_point [purge_amount] [urgency]
Thin local Time Machine snapshots for the specified volume. When purge_amount and urgency are specified, tmutil will attempt (with urgency level 1-4) to reclaim purge_amount in bytes by thinning snapshots. If urgency is not specified, the default urgency will be used.

A quick google search led me here, this gave me a rather strong impression that local Time Machine snapshots are a contributing factor on the size of the so-called purgeable space.

 

PS: I am not sure why most of the formatting was lost so I apologise for the ugly appearance of my response.

you can also try the following terminal command on your SD card

df -h

Share: