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?

  • 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. Jan 5, 2013 at 9:01
  • Tom Brossman, In Precise that does not remove any location information, but displays GPS information in EXIF metadata.
    – jarno
    Jan 6, 2013 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.
    – user76204
    Jan 6, 2013 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: u88.n24.queensu.ca/exiftool/forum/index.php/topic,4686.0.html
    – jarno
    Jan 7, 2013 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.
    – user76204
    Jan 8, 2013 at 20:04

1 Answer 1

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.)

  • I tried the same with an mp4. I don't know if it's a "video" thing or something else, but only this worked for me.
    – Kathir
    May 13, 2021 at 3:10
  • @Kathir how my solution did not work?
    – jarno
    May 13, 2021 at 11:22
  • Yes, it did not :( But, this could be because I was trying it on an mp4
    – Kathir
    May 13, 2021 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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