8

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?

6 Answers 6

8

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.)

10
  • 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, 2021 at 21:37
  • 1
    This doesn't work for me. I get (null): No such file or directory
    – UVV
    Jan 18, 2021 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... Jan 19, 2021 at 22:52
  • Nope, see my other cross-post discussions.apple.com/thread/252329699
    – UVV
    Jan 21, 2021 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
    Mar 3, 2021 at 4:25
1

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, 2020 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, 2020 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, 2020 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, 2020 at 21:32
1

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.

2
  • I don't think this can work with an APFS format TM disk.
    – Gilby
    May 11, 2021 at 22:58
  • It worked for me either: sudo tmutil delete -p /Volumes/Time\ Machine\ Backups/Backups.backupdb/ + [your computer name] + / + [timestamp] May 12 at 11:32
1

N.B. the tmutil manpage is sorely in need of an update since the changes starting with macOS 11 Big Sur.

Cf. @Tetsujin 's post

to delete an APFS timemachine backup snapshot, this works in macOS 12.1 monterey:

  # sw_vers              # print macOS version information

  ProductName:    macOS
  ProductVersion: 12.1
  BuildVersion:   21C52

for APFS timemachine backups, what the tmutil delete verb requires is the:

  • backup mount point in [ /Volumes/mountpoint ] format

  • timestamp in [ yyyy-mm-dd-hhmmss ] format

note: per the manpage, the [ -p path ] option is for HFS volumes only.

one can find the current mountpoint using the machinedirectory verb:

  # tmutil machinedirectory

  /Volumes/tm

and/or destinationinfo verb:

  # tmutil destinationinfo

  > ==================================================
  Name          : tm
  Kind          : Local
  Mount Point   : /Volumes/tm
  ID            : 6E28F286-DA89-4D4E-8AA3-5B7D831D3C6C

use the listbackups verb to list the existing snapshot timestamps

  # tmutil listbackups

  2021-12-27-184808.backup
  2021-12-28-181718.backup
  ...
  2022-01-07-180623.backup
  2022-01-08-095245.backup

so, now craft the command per above requirements:

  # tmutil delete -d /Volumes/tm -t 2021-12-28-181718

  1 backups deleted

pfbbt, bob's your uncle

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jan 6 at 4:10
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.

0

My approach today in M1 macOS Monterey

FYI, when your time machine disk is about to be full and you don't have a new disk to be appended.

$ tmutil listbackups -d /Volumes/timemachine
2021-09-19-165426.backup
2021-09-30-113009.backup
2021-10-13-130955.backup
2021-10-20-185257.backup
...

$ sudo tmutil delete -d /Volumes/timemachine -t 2021-09-19-165426
(null): Resource busy (error 16)

# reboot macOS

$ sudo tmutil delete -d /Volumes/timemachine -t 2021-09-19-165426
1 backups deleted

You must log in to answer this question.

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