The latest version of exiftool supports most file formats.
Output:
If the input file contained metadata, it removes the metadata and overwritesinputfile, but saves a copy of the original as inputfile_original in the same folder.
If the input file did not contain metadata, it performs no changes.
There are options in ExifTool to delete the original file: -overwrite_original and -overwrite_original_in_place.
The Metadata Extract Tool includes a number of 'adapters' that extract
metadata from specific file types. Extractors are currently provided
for:
Images: BMP, GIF, JPEG and TIFF.
Office documents: MS Word (version 2, 6), Word Perfect, Open Office (version 1), MS Works, MS Excel, MS PowerPoint, and PDF.
Audio and Video: WAV, MP3 (normal and with ID3Tags), BFW, FLAC.
Markup languages: HTML and XML.
Internet files: ARC
If a file type is unknown the tool applies a generic adapter, which
extracts data that the host system 'knows' about any given file (such
as size, file name, and date created).
All metadata edits are reversible. While this would normally be
considered an advantage, it is a potential security problem because
old information is never actually deleted from the file. (However,
after running ExifTool the old information may be removed permanently
using the "qpdf" utility with this command: "qpdf --linearize in.pdf
out.pdf".)
So if you really want to delete the metadata from PDF files so it cannot be recovered instead of just hiding it, you should use the command qpdf --linearize in.pdf out.pdf afterwards.
Changes to PDF files by ExifTool are reversible (by deleting the
update with -PDF-update:all=) because the original information is
never actually deleted from the file. So ExifTool alone may not be
used to securely edit metadata in PDF files.
So the command will be something like exiftool -PDF-update:all= inputfile. You can then check the properties of the file in your PDF viewer to see if the metadata is restored.
Note: this solution does not clean metadata of embedded resources like images unlike the tool mat2 shared in another answer (except when using lightweight mode: https://0xacab.org/jvoisin/mat2/-/blob/master/doc/implementation_notes.md#lightweight-cleaning-mode). But images metadata is not always present in PDF files. For example to do a PDF export with LibreOffice Writer and keep metadata, we need to disable "Reduce image resolution" (an answer also mentioned that we need to enable "Lossless compression" but I did not need it: https://security.stackexchange.com/questions/185507/does-embedding-images-in-pdf-retain-metadata).
Then I was able to save the image with metadata from the PDF file with LibreOffice Draw and view the metadata with GIMP in the menu "Image -> Metadata -> View Metadata".
The latest version of exiftool supports most file formats.
Output:
inputfile
, but saves a copy of the original asinputfile_original
in the same folder.There are options in ExifTool to delete the original file:
-overwrite_original
and-overwrite_original_in_place
.The Metadata anonymisation toolkit would do the trick for you. It has a GUI as well.
After Enabling the Universe Repository you can install it with:
Yes, there is a tool to remove metadata called exiv2.
Usage:
exiv2 rm /path/to/location/files
You can use Metadata Extraction Tool
For more information, and to download visit Metadata Extraction Tool
Source:Metadata Extraction Tool
First, install
exiftool
using this command:Then, go into the directory with the JPEG files. If you want to remove metadata from every file in the directory, use
For single file, use
When using the command
exiftool -all= inputfile
shared here on PDF files, I got this message:And by looking for the error message on a search engine, I found https://exiftool.org/forum/index.php?topic=4722.0 with a link to https://exiftool.org/TagNames/PDF.html that mentions:
So if you really want to delete the metadata from PDF files so it cannot be recovered instead of just hiding it, you should use the command
qpdf --linearize in.pdf out.pdf
afterwards.If you want to try to recover the hidden / removed metadata from PDF files, the man page https://exiftool.org/exiftool_pod.html explains how to dot it:
So the command will be something like
exiftool -PDF-update:all= inputfile
. You can then check the properties of the file in your PDF viewer to see if the metadata is restored.Note: this solution does not clean metadata of embedded resources like images unlike the tool
mat2
shared in another answer (except when using lightweight mode: https://0xacab.org/jvoisin/mat2/-/blob/master/doc/implementation_notes.md#lightweight-cleaning-mode). But images metadata is not always present in PDF files. For example to do a PDF export with LibreOffice Writer and keep metadata, we need to disable "Reduce image resolution" (an answer also mentioned that we need to enable "Lossless compression" but I did not need it: https://security.stackexchange.com/questions/185507/does-embedding-images-in-pdf-retain-metadata). Then I was able to save the image with metadata from the PDF file with LibreOffice Draw and view the metadata with GIMP in the menu "Image -> Metadata -> View Metadata".