Batch Remove Tags in OS X Terminal


Blog categories: 

I just wanted to delete all tags set in my Applications folder on OS X and had to look up how to accomplish that in the Terminal since it a) is quite cumbersome to do it in Finder and b) it did not quite work somehow.

The tags seem to be saved in the extended attributes and For completeness, here is my complete “script”:

cd /Applications
for file in *; do 
  echo $file; 
  sudo xattr -d "$file"; 
  sudo xattr -d "$file"; 

That’s it and Cheers,