Manually deleting Time Machine backups

Time Machine Backups

I use an Apple MacBook as my primary work laptop. One of the nice features that are automatically included in OSX is Time Machine, allowing you to do automatic backups.

You can do the backups to an external disk (via USB) or to a network connected disk. I also have a Synology NAS with a volume (encrypted of course) configured for the backups. I have set a quota for this volume to prevent the backups from filling up my entire NAS.

If you do backups to a USB disk then Time Machine will automatically delete older backups. Unfortunately this didn’t happen on the network volume via the Synology disk, Time Machine did not delete the old backups. This resulted in a full backup volume. I could not find the cause for this problem. File access permissions etc. were set correctly and nothing unusual was found in the logs. So instead of relying on the auto delete by Time Machine I decided to rely on manually deleting backups.

Manually delete Time Machine backups

You can manually delete your Time Machine backups via the GUI but this quickly becomes a tedious process. I wanted to automate the deletion of the backups via a script. You can control the Time Machine backups via tmutil. Listing your backups can be done via

tmutil listbackups

Deleting is done via

tmutil delete PATH_TO_BACKUP

One warning. The Time Machine volume gets mounted on your OSX when Time Machine starts. Check with

mount|grep -i backup

This should return a list containing

/Volumes/Time Machine Backups

If you try to delete a backup without having the volume mounted then you’ll receive an error

No such file or directory (error 2)
Total deleted: 0B

The trick is to first have the volume mounted (via listbackups) and then do the delete.

3 thoughts on “Manually deleting Time Machine backups

  1. Alessio on said:

    Hi there, I found myself in the exact situation (macOS 10.15): disk appears full on my Synology, tried to increase the quota on my Synology, no luck (the os still sees the old quota).
    So I tried to delete old backups but, sudo or not sudo, I only see 1 backup, which is the last I took before upgrading. I’m trying to switch to AFP instead of SMB, will keep you posted. Eventually I’m gonna delete that last backup, just don’t think it will make a big enough difference.

  2. Matt P on said:

    If you don’t see the new quota, then try rebooting or going into time machine settings, select disk, remove the synology as time machine disk and re-add it.

    I am doing a test now…the time machine disk was full but time machine on the mac showed NO backups…so I suspect that if you have the recycle bin enabled on the synology…apple faithfully deletes old backups…but synology puts them into the recycle folder which isn’t automatically purged unless you add a scheduled task. So from mac’s point of view it deleted all the old backups and nothing else it can do…but the synology is still full thanks to recycle bin. Just a theory, but I have disabled the recycle bin on the time machine shared folder on the synology and ratcheted down the quota (to run out of space sooner) to see if the behaviour improves.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.