Shell One-Liner : Strip EXIF data from photos

Linux One Liners

Strip EXIF Data from files

Here is a one liner to Strip EXIF data from photos:

Strip EXIF data from photos (this also handles space in the file names)

This line of code assumes that you are looking for png files. You can substitute jpg or anything you would like to find and alter. You need to be in the directory that your files are in so that you can effectively use this command. For more code like this go to our one liner’s page.

You can also use exiftool (download here)

This would overwrite the original metadata and leave it blank. Note: Be careful there is no backup files in this one. 

You can also overwrite just the gps data by typing in:

exiftool is a very flexible tool to rewrite exif data and comes in very handy when you want to rewrite metadata to keep your privacy online.  GPS data should be kept private, unfortunately camera phones have GPS and record that on each and every photo. So, before you upload your photos to your favorite social media site make sure they are “clean”.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 3

No votes so far! Be the first to rate this post.

Updated on October 28, 2021