I recently needed to delete the Backups.backupdb file via command line using the rm command. However, sudo user can’t do it, and neither can root. What’s a guy to do?
I needed to delete all backups for a specific host named “mini”. Some research showed a method using TimeMachine Safety Net:
sudo /System/Library/Extensions/TMSafetyNet.kext/Helpers/bypass rm -Rfv Backups.backupdb
But then I learnt of tmutil, which makes it dramatically easier:
sudo tmutil delete /Volumes/Time\ Machine/Backups.backupdb/mini
A couple of important notes. First, tmutil can be used to delete individual backups of a machine. In the command above, I didn’t specify an individual backup, so it deleted them all. And if you want to get rid of the parent “Backups.backupdb” folder, you’ll still need to use the TimeMachine Safety Net method above, which you could do after running tmutil.