Now that I’ve arrived at a first outline of what macOS space management can purge, and how it does it, the next question is which files are purgeable? I don’t know any way of finding out in the GUI or command line, although I might have missed something obvious. What I had overlooked previously is that Apple does provide a method in the API: among the many ResourceValues available for a URL is isPurgeable, alongside a sister flag for sparse files. As I already have two utilities that inspect sparse and clone file flags, it was straightforward to add to them a feature to check for purgeable files.
Precize tells you almost everything you might want to know about files, including their inode number and extended attribute size, and has extensive support for bookmarks. Two years ago, I added a couple of boxes to indicate whether it’s an APFS sparse file, and whether it has ever been cloned. This new version has a third box that informs you whether that file is purgeable.
That’s fine for individual files, but not practical for discovering them by the folderful. For that, I turned to Sparsity, which already checks for sparse files and clones, using its Crawler accessible from its Window menu.
There’s a new checkbox here so you can scan whole folders and discover exactly which of the files within them are purgeable, and how much space they occupy before being purged. This performs an exhaustive search, which on older Macs can be slow. Don’t be tempted to unleash it on the whole of your Data volume, although it should be fine for its top-level folders. Of course, even when you’ve given Sparsity Full Disk Access in Privacy & Security settings, there’s a lot of your Mac’s Data volume that it can’t check because of permissions.
Precize version 1.13, which requires a minimum of macOS 10.13, and macOS 11 or later for purgeable file information, is now available from here: precize113
from Downloads above, from its Product Page, and through its auto-update mechanism.
Sparsity version 1.3, which requires a minimum of macOS 11, is now available from here: sparsity13
from Downloads above, and from the same Product Page.
So, where are all these purgeable files?
First, macOS may not report them as purgeable space at all. On my iMac Pro, neither Disk Utility nor the Finder report any purgeable space, and available space is the same as free space. Yet Sparsity found the following:
- in ~/Library, 11,792 purgeable files, with a total size of 1.38 GB;
- in /Library, only 7.7 MB purgeable;
- in top-level hidden folders, only var had any, with a total of 51 KB.
That Data volume also currently has a total of 8.81 GB in snapshots, but as they were made by Carbon Copy Cloner rather than Time Machine, they don’t count as purgeable at all. By my reckoning there should be at least 1.4 GB of purgeable space on that Data volume, plus any that isn’t reachable from user space. Why that isn’t shown I don’t know.
On my Mac Studio M1 Max, Disk Utility and the Finder both report 6.88 GB purgeable, and Sparsity found:
- in ~/Library, 3,497 purgeable files, with a total size of 195.2 MB;
- in /Library, just 3.5 MB purgeable;
- none at all in top-level hidden folders.
That Data volume has a total of 1.57 GB in snapshots, all made by Time Machine, so they too are purgeable by macOS. I’ve thus been able to account for around 1.8 GB of 6.88 GB reported as purgeable space, with over 5 GB in unreachable folders.
I hope you find these utilities revealing.