Can't delete APFS local snapshots

While testing Catalina, I noticed that some local snapshots now have suffix ".local" like this:


com.apple.TimeMachine.2019-08-21-204446.local


And I don't seem to be able to delete it with:


tmutil deletelocalsnapshots 2019-08-21-204446


What are these snapshots and how to delete them? Any info would be appreciated!

That's just their new name. I'm not familiar with any "deletelocalsnapshots" action in tmutil, but I don't have a Catalina machine in front of me to confirm.

Is tmutil claiming success, but the snapshot persists? Or are you not even getting that far?


In any case, the system should delete the snapshots itself, as they age-out.

Catalina does indeed have a new "deletelocalsnapshots" action. It seems to work for me.


Try "tmutil thinlocalsnapshots / 10000000000 4" and see if that behaves any differently.

It's not new, it's existed as long as the snapshot feature of APFS

I have made an additional research and I have to correct my question:


First, let me explain my testing environment. I have macOS Mojave on my internal SSD, and I installed Catalina beta on an external USB HDD. Beside the APFS container on that USB disk, there are other partitions with other file systems.


Now when I boot into Catalina from the external disk, and type the following command:

tmutil localsnapshot


The system pauses for a second then says:

Created local snapshot with date: 2019-08-26-183151


However, when I type this:

tmutil listlocalsnapshots /

or

tmutil listlocalsnapshots /System/Volumes/Data


it comes out with nothing, as if the snapshots are not there. However, when I look for snapshots on the internal drive:

tmutil listlocalsnapshots /Volumes/Macintosh\ HD


I get the output:

com.apple.TimeMachine.2019-08-26-183151.local


Also, when I am logged in Catalina, I am able to delete the snapshot (contrary to what I reported previously) using

tmutil deletelocalsnapshots 2019-08-26-183151


However when I log in back to Mojave, I still can list the snapshots on the startup disk Macintosh HD, but I can no longer delete it using tmutil deletelocalsnapshots


TL;DR It looks like Catalina stores its APFS snapshots on another volume (internal disk), at least when it's booted from an external disk, and those snapshots can only be deleted when booted in Catalina that had created the snapshots. The snapshots stay there even when I unmount and disconnect the external disk!


Is it normal? This looks strange to me. I thought APFS snapshots can only exist on the same APFS volume where they were created. Am I wrong? How is it supposed to work under the hood?

Snapshot names have changed in Catalina. The ".local" suffix is new. If you are creating local snapshots with a different OS version, the other OS version is not going to be able to delete them.

But why are they saved on a different volume, even in a different APFS container? How is this even possible, given how APFS snapshots work?

I don’t think they are being saved on a different volume. They are being saved with a different operating system. They are still valid snapshots. But since they don’t conform to expected naming conventions, they don’t get removed. It would work the same way with snapshots from Carbon Copy Cloner.

In the above setup (boot Catalina from external disk), not only they are saved on a different volume, but also the different volume is located on a physically different device (internal disk), and the snapshots remain there and are discoverable even when the external startup disk is unmounted and physically ejected.


I just tested the "normal" setup, when Catalina is booted from the internal disk. In this case snapshots are saved in /System/Volumes/Data, which is kinda expected.

I know this might be an old question but there is a way to purge all local snapshots. It is working on macOS Big Sur 11.2.

Try this command in your terminal:
Code Block
tmutil thinlocalsnapshots / 999999999999999 4

If this is working for you give me an upvote, thank you.
thank you alxsl. i was getting "fsroot tree is invalid." error and saw it was having issues when scanning local time machine backups. i ran that command on big sur and my disk check is fine now.
Thanks for very simple and effective command to clean snapshots files. 🙏🙏🙏@alxsl

Thank you, @alxsl. Your command cleared out my snapshots on Big Sur. Nothing else worked. Many thanks!!! 🎉🎉🎉

Can't delete APFS local snapshots
 
 
Q