5

I'm using macOS 11 Big Sur and APFS. I sometimes want to remove old backups to save space. I don't want Time Machine taking up the entire external drive.

% tmutil listbackups
2020-10-18-001052.backup
2020-11-06-124150.backup
2020-11-15-173211.backup

% sudo tmutil delete 2020-10-18-001052.backup
Total deleted: Zero KB

I think I have to pass a "path" to tmutil delete. How do I get the path? Or how do I otherwise delete one of the backups listed by tmutil listbackups?

5

The Big Sur syntax changed, but you need to specify the volume and the timestamp with -d and -t:

sudo tmutil delete -d /Volumes/Time\ Machine -t 2020-11-18-100936

You don't need to specify the Backups.backupdb folder or the backup machine. I had done tmutil setdestination /Volumes/Time\ Machine previously (where Time Machine is the name of your drive.)

6
  • 2
    I don't know what to think now, because Apple Tech Support told me that I could not delete Time Machine backups, because it would 'corrupt' the database. I wonder if some of the people in tech support don't know their own product. – Rob N Jan 14 at 21:37
  • This doesn't work for me. I get (null): No such file or directory – UVV Jan 18 at 9:06
  • @UVV Do you have spaces in your volume name? Perhaps try "/Volume/My Backup Drive" - replacing My Backup Drive inside of quotes. In the example above I escaped the space... – Adam Morris Jan 19 at 22:52
  • Nope, see my other cross-post discussions.apple.com/thread/252329699 – UVV Jan 21 at 6:02
  • 1
    Apple Support is wrong. You can delete backups. In the past this wasn't the case, but it's true now. – Ezekiel Elin Mar 3 at 4:25
0

This is a pretty tentative answer, but too much for a comment...

Big Sur & Time Machine on APFS will always require the entire volume. You can't do anything other - see APFS changes in Big Sur: how Time Machine backs up to APFS, and more

APFS doesn’t support directory hard links, so can’t use the same mechanism when storing Time Machine backups. Instead, what appears to function as a form of virtual file system is created using new features in APFS.
The volume assigned the role of Backup appears to be a regular APFS volume, and is protected from normal access, even by root.

I have to admit I cannot investigate this myself to confirm, I don't have a Big Sur-capable Mac here.

4
  • Okay, but what does that mean for tmutil delete? They're storing the backups differently on APFS, but they should still be able to implement the delete function. – Rob N Dec 3 '20 at 19:57
  • If the entire volume is a] protected even from root & b] cannot be used for any other purpose… what's the point of trying to take manual control of the process? If you want a smaller backup footprint, save it to a smaller volume. – Tetsujin Dec 3 '20 at 19:59
  • 1
    Apparently APFS volumes do not have a maximum size by default. It will just expand to take all available space, even though there are other volumes on the disk. I don't see a way in disk utility (so far) to add a max size limit to my existing volume. So, as it is now, Time Machine will take over my entire drive and I can't stop it, which is ridiculous. – Rob N Dec 3 '20 at 21:24
  • Also, the volume is not protected by access from root. I just created and deleted a test file at the root of the volume. There may be some confusion around this point on the internet, because certain commands in Terminal (eg, sudo touch test-file.txt) will fail if you haven't enabled Full Disk Access for Terminal in System Preferences. – Rob N Dec 3 '20 at 21:32
0

In addition to the combination of -d and -t, you can also use the -p parameter to provide the full path to the backup (if you know it):

tmutil delete [-d backup_mount_point -t timestamp] [-p path]

This works for me:

sudo tmutil delete -p /Volumes/Time\ Machine/Backups.backupdb/macbook/2021-04-03-123111/

This is on macOS Big Sur 11.3.

1
  • I don't think this can work with an APFS format TM disk. – Gilby May 11 at 22:58
0

My answer is more complex than that of @Adam Morris, but with some differences. On refection I think the complexities are not needed and that @Adam Morris's answer is correct and sufficient. I'm leaving this answer (which I believe to be correct) in case it is useful to others.

man tmutil says that the command is:

tmutil delete [-d backup_mount_point -t timestamp ...] [path ...]

What is the mount point? There are two steps:

  1. With Finder look in the snapshot's volume on the Time Machine disk.
  2. List the mount point with the command mount. This includes lines like this:

com.apple.TimeMachine.2020-12-08-145707.backup@/dev/disk10s2 on /Volumes/.timemachine/8A653E1B-09C0-44C1-9F6C-EF28F0F7A087/2020-12-08-145707.backup (apfs, local, read-only, journaled, nobrowse)

So I have tried the command:

sudo tmutil delete -d /Volumes/.timemachine/8A653E1B-09C0-44C1-9F6C-EF28F0F7A087/2020-12-08-145707.backup -t 2020-12-08-145707

The immediate response is: Total deleted: Zero KB and the folder on the TM drive has gone.

But has the backup really gone? I am not sure!!

So my suggestion is that the command should be like this:

sudo tmutil delete -d /Volumes/.timemachine/<UUID>/<date-time>.backup -t <date-time>

where the UUID and date-time are from running the mount command.

-1

If the goal is to limit the disk space usable by the Time Machine volume created in the single container of an external disk, the easiest way is to limit the size of the APFS Time Machine Volume by imposing a maximum size on it that should not be exceeded (quota option). I have detailed the method here: https://apple.stackexchange.com/a/419848/415185 This of course involves recreating the Time Machine volume.

You must log in to answer this question.

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