Home Life Legos Tech Mac Graveyard
magnusviri

2014-04-15

Removing Mac OS X ACLs and Extended Attributes

Recursively Removing ACLs

chmod -RN /path/to/directory

Recursively Removing Extended Attributes

All attributes

xattr -rc /path/to/directory

Specific attributes

ls -l@
xattr -rd com.apple.NAME /path/to/directory

Here are the types of files that I know actually care about extended attributes.

Recursively Removing Files in Time Machine backups

You can delete files using the Time Machine app, but if you want to do more then that, there are ways to do it with the Terminal. To delete some files in a Time Machine backup.

tmutil delete /Volumes/[disk]/Backups.backupdb/HOST/DATE_FOLDER

To completely delete all backups use bypass. Note, you should not use this to delete some files because using bypass + rm will delete files in other backups, so if you want to delete only some, use the tmutil option.

10.7

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/MacOS/bypass rm -rfv /Volumes/[disk]/Backups.backupdb

10.8+

sudo /System/Library/Extensions/TMSafetyNet.kext/Helpers/bypass rm -rfv /Volumes/[disk]/Backups.backupdb

Copyright 2017 James Reynolds