Doesn't seem to work on Sonoma
No matter what option I use, the script errors out.
OS: macOS 14.4.1 23E224 x86_64, Kernel: 23.4.0
It seems like there may be a change in what's returned from tmutil(8). Here's the output
~/Documents/src/Time-Machine-Cleanup$ sudo tm-cleanup.sh -d 30
Unexpected snapshot name: 2024-02-15-151647.backup.
Aborting.
In Sonoma this line
https://github.com/emcrisostomo/Time-Machine-Cleanup/blob/3ae08f9b59ccd4ca247ad33e21504cda3cc0b0c3/src/tm-cleanup.sh.in#L262C1-L262C54
has to be changed to:
TM_BACKUPS=( "${(ps:\n:)$(tmutil listbackups -t)}" )
I do not have previous macOS to test if this would work for older OS versions or has to be made conditional.
Thank you, Kapitainsky!
Can I ask if you're using APFS for HFS+ for your TM backup?
I'm using APFS and found that I need to change the tmutil delete command.
~$ tmutil machinedirectory /Volumes/TM Encrypted SSD
~$ sudo tmutil delete -t 2024-02-15-151647 -d "/Volumes/TM Encrypted SSD"
I only have APFS TM backups, so I cannot test to see if it would be the same command for HFS+ TM volumes.
I've updated the script to work with Sonoma and APFS TM backups in this repo.
I don't have HFS+ to test against, but suggest code to make it work for either FS in Changes.md.