How to: Delete Time Machine Backups

You may want to delete old Time Machine backups to free up space and create new backups. You may also get this message: “Time Machine could not complete the backup,” if the backups are larger and exceed the available disk space on your Mac. Whatever the reason may be, in this guide, I will discuss two methods that will help you delete backups. However, I would suggest that you read the complete guide before proceeding and pick the method that best fits your skills.

Delete Time Machine Backups

Method 1: Using the Terminal Utility.

CAUTION: Only use this method if you know what you’re doing because the actions taken cannot be undone.

1.  Open Applications -> Utilities -> Terminal.
2.In the terminal, type the following command and replace the path with the appropriate one:

sudo tmutil delete /Volumes/drive_name/Backups.backupdb/old_mac_name

You can get this information from the Finder.

Drive_name” is your drive name.                                                                                                                backups.backupdb (the backup path).
Old_Mac_Name (name of the backup file).

When you enter the command above, it will prompt you for your password but this will not be echoed/displayed, so simply enter the password and hit the return/enter key.

You can also use the tmutil tool if you want to delete backups one by one.

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

The tmutil will not work on any versions earlier than Lion, as it was introduced with Lion.                         

Method 2: Via Time Machine (GUI).

So far, the easiest method is to open Time Machine and browse to the point/time you want to delete. Choose the cog icon in the Finder and click on “Delete Backup.” This will ensure that the data integrity stays intact.

Method 3: Via the Bash Script

Below is the script that will automatically locate the oldest backup on Time Machine. It will prompt you for a “Y” input. The script needs to be copied and saved as a .sh file. When you run it, you will be prompted for the administrator password to confirm deletion.

COMPUTER_NAME=$(/usr/sbin/scutil –get ComputerName)
NBACKUPS=$(/usr/bin/tmutil listbackups |
/usr/bin/grep “$COMPUTER_NAME” |
/usr/bin/wc -l)
OLDEST_BACKUP=$(/usr/bin/tmutil listbackups |
/usr/bin/grep “$COMPUTER_NAME” |
/usr/bin/head -n1)
LATEST_BACKUP=$(/usr/bin/tmutil latestbackup)
Echo the latest backup: $LATEST_BACKUP.                                                                                                                    if [[ -n “$LATEST_BACKUP” && “$LATEST_BACKUP” != “$OLDEST_BACKUP” ]] then
echo -n “$NBACKUPS backups. Delete oldest: ${OLDEST_BACKUP##*/} [y/N]? ”
Read the answer.                                                                                                                                                            case $answer in
y*)
echo Running: /usr/bin/sudo /usr/bin/tmutil delete “$OLDEST_BACKUP”
/usr/bin/sudo time /usr/bin/tmutil delete “$OLDEST_BACKUP”
;;
*)
echo No change
;;
esac
else
Echo, “No backup available for deletion.                                                                                                                      fi                                                                                                                                                                                   

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.