24

I (think I) can delete all GPS information from jpeg file's metadata by

exiftool -gps:all= -xmp:all= filename.jpg

but that deletes all XMP metadata. Is there a way to delete only GPS information from XMP metadata (and from any other metadata group) by not designating individual GPS tags separately?

jarno
  • 5,600
  • Can you try exiftool -a -gps:all image.jpg instead? Source I'm not sure about the XMP metadata, but that should remove the location info from the JPEG. – Tom Brossman Jan 05 '13 at 09:01
  • Tom Brossman, In Precise that does not remove any location information, but displays GPS information in EXIF metadata. – jarno Jan 06 '13 at 13:51
  • 1
    @TomBrossman You were just missing the =; the command is: exiftool -a -gps:all= image.jpeg; that will remove all gps info, while retaining all other types of metadata. –  Jan 06 '13 at 19:32
  • @Mik, no, that might not remove all GPS info; it removes GPS info in Exif metadata only. GPS info may be duplicated in XMP metadata. Please see this exiftool forum thread: http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,4686.0.html – jarno Jan 07 '13 at 22:34
  • 1
    Judging by the forums, I think you know more about it than me: I should use the most recent version of exiftool when testing the various commands as the version in the repos is quite old. Also, it's ok to give an answer to your own question if you want. –  Jan 08 '13 at 20:04

1 Answers1

21
exiftool -gps:all= -xmp:geotag= image.jpg

deletes only GPS tags in Exif metadata and XMP metadata, but might not delete all XMP GPS metadata at least by old exiftool. If you want to be sure that all GPS information will be deleted, and it does not matter if all XMP counterparts of Exif data will be deleted, replace -xmp:geotag= by -xmp-exif:all=. (Note that there might also be other location information in metadata besides GPS information, even in IPTC metadata.)

jarno
  • 5,600