I use following command for remove unwanted exif tags using exiv2:

$ exiv2 -M"del Exif.Image.LightSource" image.jpg

But if I have unwanted tags that unknown, how can I remove it? I cannot use translated tag name like Exif.Image.LightSource but I know hexa code of the tag like 0x9208. Is there any access method for this unknown tags?

  • The tags are "unknown" only because the application you are using to read them can't identify them. Use an EXIF reader that can read them and there will be no "unknown" tags.
    – Michael C
    Jan 16 '18 at 13:31
  • 1
    @MichaelClark, Yes, you are right. the tag is unknown because application cannot understand it. But in my case, it can be broken tags. Anyway I want to know if there is a way to access the tag with hexa value not name of the tag.
    – sio4
    Jan 16 '18 at 13:50

This page, and the standard file it links to, seem to indicate that every (standard) EXIF tag has a standard name associated with its hex code.

The documentation of both ExifTool and Exiv2 give no indication that you can use hexadecimal tag values.

If you really insist on removing all tags exiv2 can't read, a work-around could be to extract tags you need, or want to keep, then remove all tags and insert back the previously saved tags (see Exiv2 'extract' and 'insert' commands).

And if you indeed have broken tags, what guarantees you that removing them won't corrupt the remaining metadata?

  • Thanks @remco for your answer. Especially for last sentence, you are definitly right. Normally if I have corrupted meta, I need to correct them all from scratch, only with the extracted values. Anyway in my case, I think this problem comes from vendor's mistake on a single tag.
    – sio4
    Mar 11 '18 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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