16

I know that oldest backups are removed automatically when there is no space for new ones on TimeMachine. I use TimeCapsule also for sharing files on WiFi, so I’d like to free some space by removing of unnecessary backups:

  • Large files which needen’t to be backed up (e. g. image previews of Lightroom over 1 GB). I have excluded them in TM preferences but they are already present in older backups keeping space forever.

  • Oldest backups I know I will not need. (So to trigger the same as TimeMachine does automatically but earlier than disk gets empty).

7

I use this article to help me in deleting files from Time Machine:

It talks about removing all the backups of a single file, maybe it's not what you're looking for, but it definitely could resolve the first issues (Lightroom previews). In practice, it's easier to delete all backups of one file or all files in one backup than it is to go in and remove only one file from one backup.

Here's a brief summary of that article:

  1. Open Time Machine
  2. Select the folder/file you want to delete from your backups
  3. Through the "option" menu in the Finder menu bar (ctrl-click is not available in TM, don't know why) select "Delete all backups of selectedfile", where selectedfile is (obviously!) the file you selected.
12

You can simply enter Time Machine and select folders, apps, and files and select to delete all backup copies of that item. The command line tmutil compare also gives exhaustive detail of what changed between backup intervals if you don't mind using the terminal and a UNIX shell. Even without shell tools, you can micromanage storage from the Time Machine GUI as follows - quoting Apple's article on Mac Basics: Time Machine:

You can also enter the Time Machine restore interface and find files that can be removed from the backup drive itself to conserve space. To do this, select the file(s) and from the Action pop-up menu (gear icon) in the Time Machine Finder window choose "Delete All Backups of...". Be sure to only delete files you are sure you won't need or want to restore later.

Next, you can use a tool like BackupLoupe to analyze your Time Machine backups to identify how much space each interval used, how much space your average backup takes, how long it will be to fill the drive at the current rate, etc…

BackupLoupe

With that level of detail, you can curate your storage needs as little or with as much detail as the situation requires. This tool has helped me figure out problematic backup drives, Macs with filesystem corruption (when each backup is larger than it should, etc…) Once you have visibility on what's being stored, you can delete folders, entire snapshots and configure your backup exclusion lists to be in harmony with your available storage and backup needs.

  • 2
    That BackupLoupe is awesome! Unfortunately it doesn't allow to delete files, but a good workflow is: 1) locate big chunk in BackupLoupe 2) ⌘+i and copy of path 3) ⌘+shift+g in Finder and paste second half of path 4) enter TimeMachine 5) select a file and „Delete all backups“ from „Options“ menu as described in the other answer – myneur Mar 27 '13 at 14:59
  • Yes - both answers cover the Action pop up menu with the gear control. It's quite handy since Time Machine won't let finder or apps like BackupLoupe to actually delete files from within the backup store (by design). – bmike Mar 27 '13 at 15:05
4

If you want to delete a backup from a certain date, there is a solution for that. I saw it from this screencast:

  • Go to the time machine icon on the menu bar, click enter time machine.
  • After your desktop goes into the stars animation, you should be able to see a list of dates of your backups on the right.
  • Go to the backup date that you want to delete
  • In the middle, click the gear icon and click Delete Backup.
  • Type your password when prompted
  • 3
    To clarify: the Gear Icon is in the Finder toolbar in the Time Machine view. – Nelson Oct 27 '13 at 17:29
2

What's wrong with Entering Time Machine, browsing to the oldest backup of the entire drive, right clicking, and selecting Delete Folder. Works for me.

  • That works. As described more precisely by bmike above. I just didn't know it is possible do it like that.. – myneur Sep 9 '13 at 13:57
2

I wrote a bash script to delete all the backups but the latest since the ones posted elsewhere didn't work for me. I know you didn't want to specifically do that, but it can be modified to keep more backups (see below). Please not that this does not apply to deleting specific folders or files from backups. This script assumes that you have it on a local hard disk (an external disk, most likely). I had to write my own because the backups are not associated with this computer, so tmutil listbackups doesn't work, and that's what other scripts depended on.

In the scripts below, replace DISKNAME with the name of the hard disk with the Time Machine backups and COMPUTERNAME with the name of the computer that the backups belong to.

First, run this script to see a list of the backups the script will delete:

while read line; do
    echo "/Volumes/DISKNAME/Backups.backupdb/COMPUTERNAME/${line}"
done < <(ls /Volumes/DISKNAME/Backups.backupdb/COMPUTERNAME | tail -r | tail -n +3)

The +3 will make leave the last backup. If you want to keep the last two backups, make it +4. To keep the last three backups, +5, and so on.

To delete all of the backups except the latest, run this script:

while read line; do
    sudo tmutil delete "/Volumes/DISKNAME/Backups.backupdb/COMPUTERNAME/${line}"
done < <(ls /Volumes/DISKNAME/Backups.backupdb/COMPUTERNAME | tail -r | tail -n +3)

I know it could be made fancier by defining variables and stuff, but to be honest, I'm not that well-versed in shell scripts. I just know the other super-complicated ones didn't work, but this one did for me, so here it is for posterity.

  • After running this, there is a need to do the backup again, because only changed files are backed up, so the lats backup contains only files changed from the previous one. Do I understand it right? – myneur Jan 18 '15 at 12:36
  • 1
    It would contain all files as they were at the time of the latest backup. So even if a document had not changed between the second-to-latest backup and the latest backup, it's still there. It is correct that each backup is incremental, meaning that it only backs up the files that have changed. But the files are stored as hard links, meaning that an identical file in two backups is stored just once, but with hard links in both backups pointing to that same file. So if one hard link is deleted, the other hard link still points to the file data, and so it still exists. – LakeHMM May 26 '15 at 1:06
  • I've tried this locally... While it works, there's a risk if there are less than four backups. If there are four or more existing backups, it will delete them with the exception of the most recent one. If there are less than four, the tail -n +3 will list the three remaining backups, which includes the latest one. Take extra care when using this... – nwinkler Aug 16 '15 at 9:35
2

I've written a shell script that lets you optionally specify the number of days to keep: all the backups older than the specified number of days (from now) are deleted.

You can check it out on its GitHub repository.

0

Disk Inventory X app really helped me on detecting big files on backup disk. After that, i just removed big files manually.

  • This application doesn't seem to have been updated since 2005. What is your experience with using it to remove unnecessary Time Machine backups as described in the question? – nohillside Nov 2 '13 at 21:34
  • I'm just searching backup directory and finding big unnecessary multimedia files. – caner Nov 5 '13 at 21:09
  • And you are backing up using Time Machine? How do you delete the files from the backup drive afterwards? – nohillside Nov 5 '13 at 21:11
-1

Hi yep it was easier than I thought too I just clicked on the time machine icon then clicked on the hard drive where the time machine is then selected the backups I don't want (in the usual way - hold cmd and select the backup dates you want to delete then hit delete in the File toolbar and low, they're gone. Then empty the trash. then check the space you have created on the Hard Drive where the Time Machine lives!

You must log in to answer this question.

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