9 Replies
      Latest reply on Aug 27, 2019 8:22 AM by Sheldon15
      Sheldon15 Level 1 Level 1 (0 points)

        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!

        • Re: Can't delete APFS local snapshots
          john daniel Level 3 Level 3 (490 points)

          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.

          • Re: Can't delete APFS local snapshots
            jerryfrit Level 1 Level 1 (0 points)

            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.

            • Re: Can't delete APFS local snapshots
              john daniel Level 3 Level 3 (490 points)

              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.

              • Re: Can't delete APFS local snapshots
                Sheldon15 Level 1 Level 1 (0 points)

                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?

                  • Re: Can't delete APFS local snapshots
                    john daniel Level 3 Level 3 (490 points)

                    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.

                      • Re: Can't delete APFS local snapshots
                        Sheldon15 Level 1 Level 1 (0 points)

                        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?

                          • Re: Can't delete APFS local snapshots
                            john daniel Level 3 Level 3 (490 points)

                            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.

                              • Re: Can't delete APFS local snapshots
                                Sheldon15 Level 1 Level 1 (0 points)

                                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.