DOKK / manpages / debian 12 / mat2 / mat2.1.en
mat2(1) User Commands mat2(1)

mat2 - the metadata anonymisation toolkit 2

mat2 [-h] [-v] [-l] [-V] [-s | -L] [files [files ...]]

mat2 removes metadata from various fileformats. It supports a wide variety of file formats, audio, office, images, …

Careful, mat2 does not clean files in-place, instead, it will produce a file with the word "cleaned" between the filename and its extension, for example "filename.cleaned.png" for a file named "filename.png".

the files to process

show this help message and exit
show program's version number and exit
list all supported fileformats
check if mat2 has all the dependencies it needs
show more verbose status information
how to handle unknown members of archive-style files (policy should be one of: abort, omit, keep)
list harmful metadata detectable by mat2 without removing them
remove SOME metadata
disable bubblewrap's sandboxing
clean in place, without backup

To remove all the metadata from a PDF file:

mat2 ./myfile.pdf

While mat2 is doing its very best to display metadata when the --show flag is passed, it doesn't mean that a file is clean from any metadata if mat2 doesn't show any. There is no reliable way to detect every single possible metadata for complex file formats.

This is why you shouldn't rely on metadata's presence to decide if your file must be cleaned or not.

Moreover, mat2 goes to great lengths to make sure that as much metadata as possible are removed. This might sometimes result in a loss of quality of the processed files. For example, textual based pdf file converted into image based one means that it'll be no longer possible to select text in them. If you're experiencing this, you might want to give the lightweight cleaning mode a try, but keep in mind by doing so, some metadata won't be cleaned.

While mat2 does its very best to remove every single metadata, it's still in beta, and some might remain. Should you encounter some issues, check the bugtracker: https://0xacab.org/jvoisin/mat2/issues

Please use accordingly and be careful.

This software was made by Julien (jvoisin) Voisin with the support of the Tails project.

This software is released on LGPLv3.

exiftool(1p) pdf-redact-tools(1)

February 2023 mat2 0.13.3