User Tools

Site Tools


docu:csheet:ofsec:priv:image_metadata

How to remove all metadata from an image on Linux


Install the package (on Debian-based)

apt install libimage-exiftool-perl

We can now remove the metadata

# syntax
exiftool -all=[VALUE] [AFILEORFILES]
 
# example:
exiftool -all= *.jpg

This operation also changes file modification time, if you want to recover the modification time of files you can do it with a simple find/sed command

find . -type f -iname '*_original' -exec bash -c 'TGT=$(echo {}|sed "s/_original\$//"); touch -r {} "$TGT"' \;
docu/csheet/ofsec/priv/image_metadata.txt · Last modified: 2020/09/06 12:06 by admin