Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I remove Finder tags from all files in a given folder and in its subfolders?

share|improve this question
    
I wish I had an answer, I'm curious as well. If you're handy with the shell then the mdfind command may be part of your solution in the end. Good luck. –  Charlie Wilson May 12 at 20:16

2 Answers 2

You can use Homebrew's tag:

brew install tag
tag -r /path/*

You can combine this with a find command to find specific files/folders + recursive.

find . -exec tag -r {} \;  -print
share|improve this answer

You can also use xattr:

xattr -dr com.apple.metadata:_kMDItemUserTags ~/folder
xattr -dr com.apple.FinderInfo ~/folder

If you don't delete the com.apple.FinderInfo extended attributes, Finder keeps showing the color labels for tags with colors. If you don't want to keep any extended attributes, you can just run xattr -cr ~/folder.

You can use find -xattrname or mdfind to find files with tags:

find ~/folder -xattrname com.apple.metadata:_kMDItemUserTags
mdfind -onlyin ~/folder kMDItemUserTags=\*
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.