Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Batch removal of tags/keywords from pictures UNIX
I used exiftool for batch removal of keywords for a long time, but recently it stopped working. I could still overwrite keywords, but as soon as I deleted the keyword, the old ones were back. After examining the binary files directly, I found out that at least Aperture writes the keywords as XMP Subject, and that Preview falls back to XMP Subject if there is no IPTC Tags. That's why when I overwrote the keywords, it seemed to work: XMP Subject tags were still there, but were not displayed by Preview.

You'll need to install exiftool for this to work.

The command I now use is:
exiftool -IPTC:Keywords= -XMP:Subject= [a-zA-Z0-9]*.jpg ; rm -f *_original
This will remove all keywords from all the .jpg files in the current directory, for example.

[crarko adds: I haven't tested this one. We've covered other uses of exiftool for things like image rotation in a previous hint.]
    •    
  • Currently 2.17 / 5
  You rated: 5 / 5 (23 votes cast)
 
[5,817 views]  

Batch removal of tags/keywords from pictures | 4 comments | Create New Account
Click here to return to the 'Batch removal of tags/keywords from pictures' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Batch removal of tags/keywords from pictures
Authored by: boardhead on Jul 14, '10 09:09:07AM
Try this instead. It is simpler and handles upper and lower case "JPG" extensions:
exiftool -IPTC:Keywords= -XMP:Subject= -ext jpg -overwrite_original .
- Phil

[ Reply to This | # ]
Batch removal of tags/keywords from pictures
Authored by: kaz219 on Jul 14, '10 01:34:59PM

Problem is, this also process hidden files starting with ._ (and also have a jpg extension) which I don’t want to process…



[ Reply to This | # ]
Batch removal of tags/keywords from pictures
Authored by: brh on Jul 15, '10 11:21:12AM

So, to that end, you worded your hint wrong, and the command as you gave it will not strip the data from 'all jpegs in a directory.' Whereas, the suggestion suggested above presumably will.



[ Reply to This | # ]
Batch removal of tags/keywords from pictures
Authored by: boardhead on Jul 16, '10 09:02:44AM
I see. The "._*.jpg" files are not JPEG format so you don't want to process them. They are resource files which you can get by writing from Mac OS X to a non-OSX filesystem.

- Phil

[ Reply to This | # ]