Created
February 13, 2025 16:17
-
-
Save mrkaspa/2bd5e91b06a0c67fb9c287d4720fd86b to your computer and use it in GitHub Desktop.
Script to delete the timemachine backups in mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| output=$(tmutil listlocalsnapshots /) | |
| output_list=($output) | |
| for x in "${output_list[@]:4}"; do | |
| echo "Deleting $x" | |
| sudo tmutil deletelocalsnapshots $(cut -d '.' -f 4 <<<"$x") | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment