sawyl: (A self portrait)
[personal profile] sawyl
Having finally decided to deal with the internal disk on my iMac — it went into read-only mode a while a go and I've been running off an SD card ever since — I realised I needed to free up space on an external disk in order to back up the contents of my home directory. But when I checked, I discovered the 1.5TB external disk was almost completely full with stale Time Machine backups (I temporarily stopped running backups in late 2014 and failed to renable them; something that turns out to be the principal reason for my current predicament)

My initial attempt to remove the files with a naive sudo rm -Rf Backups.backupdb failed with a whole slew of operation not permitted errors. Investigating further, I found the ACLs on the directory were configured to prevent the casual removal of the directory — an eminently sensible precausion.

A quick google revealed a solution to the problem: the Time Machine bypass command. The location varies depending on the release of OS X, but when the command is used as a prefix to the remove, i.e.

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass rm -Rf Backups.backupdb

it allows rm to ignore the ACLs and allowed me to blow away the entire backup directory with a single command — something that freed up 900GB of space and maybe 100 million inodes.

It's worth noting that the only reason I was able to use bypass rm rather than the officially approved tmutil delete was because the backup directory was stale and no longer in use. Using rm on an active Time Machine database has the potential to screw up the hard links used to build the individual backup images.

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 12:58 am
Powered by Dreamwidth Studios