Operations 3 min read

Simplify macOS Time Machine Cleanup with the Interactive tm-cleanup.sh Script

This article introduces tm-cleanup.sh, a shell script that automates Time Machine backup removal on macOS, now featuring an interactive, dialog‑based interface that lets users browse and delete snapshots without needing command‑line expertise.

21CTO
21CTO
21CTO
Simplify macOS Time Machine Cleanup with the Interactive tm-cleanup.sh Script

About two years ago I created a shell script called tm-cleanup.sh to automate the cleanup of macOS Time Machine backups, handling timestamps and other details. The script proved very useful and saved a lot of time.

Because some non‑technical users encountered difficulties running the script from the CLI, I added an interactive, dialog‑based interface to make the process visual and user‑friendly.

The new version 2.0 can be launched simply with the following command: $ sudo tm-cleanup.sh The script takes no arguments. The interactive menu displays a list of existing Time Machine snapshots, allowing users to select and delete individual backups.

Below is a screenshot of the backup list interface:

Time Machine backup list screenshot
Time Machine backup list screenshot

For more details and documentation, visit the GitHub repository at https://github.com/emcrisostomo/Time-Machine-Cleanup .

Author: Enrico Maria Crisostomo Translator: 21CTO Community Original article: https://dzone.com/articles/tm-cleanupsh-a-shell-script-now-featuring-an-inter
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

interactiveAutomationmacOSshell scriptbackup cleanuptime machine
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.