21

I've used my Time Machine drive to back up my main machine, and also a friend's mac. Her machine is now being backed up on another Time Machine drive, and she'd like me to delete her backup.

I'm familiar with the (perhaps obscure) way to delete a particular time machine backup, or how to delete all backups of a particular file, but I have no idea how to delete another machine's backup.

If I had access to her machine, I'd plug in the drive and delete the entire backup of her drives using time machine on her computer. Whether or not it is reasonable to have to do this is irrelevant, I guess, because that machine isn't available to me. :)

Please nobody suggest I drag her backup to the trash. I did that once and the trash never finished emptying.

Any ideas?

1
  • I dragged the backup folder of one of my old machines and, like you wrote, I cannot empty the trash. Also I cannot drag it back because there is an error: "The operation can’t be completed because backup items can’t be modified." So how did you get rid of that folder?
    – puri
    Commented Mar 24, 2011 at 5:58

4 Answers 4

24

You can use the tmutil tool to delete backups one by one.

sudo tmutil delete -p /Volumes/drive_name/Backups.backupdb/mac_name/YYYY-MM-DD-hhmmss

If you are sure you have selected the correct name, you can delete all backups from that one Mac by not passing in the time and letting it delete the entire folder:

sudo tmutil delete -p /Volumes/drive_name/Backups.backupdb/mac_name

The sudo command needs your password (and it won't echo to the screen, so just type it and pause to be sure you're dating the correct files before pressing enter).

Editor note: Older versions of macOS may not accept the -p flag, and it should be omitted. Run man tmutil to see documentation for the tool (q to exit).

4
  • The other Mac's name doesn't appear in the Backups.backupdb folder for me (on 10.11.3). Commented Mar 30, 2016 at 5:40
  • @SamBrightman Is it possible the drive was full and old backups got pruned? It's not usual to have all backups deleted - the system normally leaves one intact in the worst case. Maybe start a new question if you'd like help making sure it's not a permissions issue on the drive or failing drive?
    – bmike
    Commented Mar 30, 2016 at 13:12
  • This command doesn't work (anymore?) to delete all backups for a machine, you can only remove individual backups with it in Catalina. Trying it for a machine results in Invalid deletion target (error 22).
    – mgol
    Commented Mar 4, 2021 at 22:19
  • Thank you so much for providing a path in the examples. My issue is that the old computer being backed up does not provide the "delete previous backups" (to paraphrase) options in the time machine interface for whatever reason and the listbackups command always returns an error. We'll see if an actual delete command works...
    – hepcat72
    Commented Oct 11, 2022 at 23:40
5

(Unearthing this 12 years old question... but I didn't find an answer elsewhere)

On Ventura you need to pass "-p" to specifiy a path, e.g.:

sudo tmutil delete -p "/Volumes/Time Machine Backups/Backups.backupdb/Olivier’s MacBook Pro"

It's painfully slow, but it seems to be working

1
  • 1
    I also could not find this info elsewhere, and this was extremely helpful -- and still works on Ventura as of January 2023.
    – mweiss
    Commented Jan 30, 2023 at 23:29
0

Here's what works for me on macOS Ventura:

# List all your backup (replace with your path)
tmutil listbackups -d /Volumes/BUGSBACKUP

# Delete a specific backup (replace with your path and your timestamp)
sudo tmutil delete -d /Volumes/BUGSBACKUP -t 2022-04-05-151520

Oh, and I had to go to System Preferences - Privacy & Security first to allow my terminal (I use Hyper) a Full Disc Access.

5
  • How can this be used to delete backups made by another machine?
    – nohillside
    Commented Jun 29, 2023 at 11:13
  • @nohillside exactly as is. I used these exact two commands to delete backups made by my previous machine while already on my new machine. It's the -d /your/path that allows you to use tmutil on your machine to delete backups made by another machine. If I misunderstood please explain in more detail.
    – Bugs Bunny
    Commented Jun 29, 2023 at 11:35
  • I would expect to see the machine name somewhere if you delete backups from another machine.
    – nohillside
    Commented Jun 29, 2023 at 11:40
  • I think I understand your confusion. As per discussions.apple.com/thread/253711086 you cannot back up multiple machines into a single destination. You either need a dedicated partition, or use Disk Utility to create a dedicated Time Machine volume. So by adding the -d /your/path you effectively specify backups from a certain machine. You should supply the path where you backed up your particular machine. Hope it makes sense.
    – Bugs Bunny
    Commented Jun 29, 2023 at 12:37
  • I see. The answer might benefit from this additional context though, and some more detailed instructions, to reduce the risk of people blindly deleting their own backups.
    – nohillside
    Commented Jun 29, 2023 at 13:09
-1

It should be something along the lines of

$ sudo rm -rf /Volumes/BackupVolume/Backups.backupdb/machinename
6
  • 1
    I seem to remember trying this "last time" and the command hung for many hours. I ended up just re-formatting the drive, but I don't want to do that in this case...
    – aaaidan
    Commented Mar 9, 2011 at 4:30
  • It will take a while if there are many backups, since it's all individual files and not archives. Wait it out. I just did this on an ex-Time Machine drive (having migrated the backup to a larger drive) and it is slow but it will finish.
    – geekosaur
    Commented Mar 9, 2011 at 5:16
  • 5
    This won't work since the filesystem protects the Backups.backupdb even from the root user asking to delete files.
    – bmike
    Commented Jul 5, 2012 at 20:06
  • 2
    rm -rf doesn't work, even with sudo (fs denies permissions) this is the only way to go:<br> sudo tmutil delete [path to machine name] **Example:**<br> sudo tmutil delete /Volumes/BackupDisk/Backups.backupdb/oldmachine Commented Oct 10, 2015 at 3:16
  • tmutil delete for a machine folder also doesn't work: Invalid deletion target (error 22). It only works for individual backups on Catalina.
    – mgol
    Commented Mar 4, 2021 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .