Deleting metadata from files
jhead
You can use jhead
[8], a small command-line program, to modify the Exif headers in JPEG files. Due to the software's considerable number of parameters, jhead
requires a longer training period depending on your intended use. Because jhead
can only handle JPEGs, you will get an error message if you call a file in any other format.
To display an image file's metadata, use the command:
jhead FILE
The application then lists the individual Exif tags in the terminal (Figure 6). To change the tags based on the parameters supported by the software, use the command:
jhead PARAMETER FILE
The individual parameters are revealed by calling jhead -h
. To change the same Exif tag for multiple files located in a directory, you can also specify the file names using wildcards, resulting in jhead
doing the job in one fell swoop.
mat2
A classic tool for removing metadata from file collections, the Metadata Anonymisation Toolkit 2 (mat2) [9] not only supports images and audio and video files, but it also supports PDF and Office file formats. This makes mat2 particularly suitable for users in sensitive areas, such as journalists or lawyers.
The command-line tool offers numerous options and parameters, which require some familiarization. However, a plugin for the Gnome file manager Nautilus lets you clean up groups of files at the command line even without knowing the syntax (Figure 7). To do this, you simply select the files to be cleaned and then right-click to call up a context menu in which you click the Remove metadata option.
Using the plugin, you can select files with a wide variety of formats; mat2 identifies the format and applies the correct routines to remove the metadata. During cleanup, the plugin also displays a progress bar at the top of the program window. In addition to the original file, which remains unprocessed, the cleaned file, which has the same name with cleaned
appended, is created in the working directory.
The Tails security distribution ships mat2 with the Nautilus plugin pre-configured.
Metadata Cleaner
Only a few distributions currently have Metadata Cleaner [10] in their repositories. Native binaries are available for Arch Linux, Debian, and Ubuntu and their descendants; a Flatpak and the Python source code are also available.
After installation and first startup, Metadata Cleaner loads with a visually modern and functionally spartan window: Metadata Cleaner has no conventional menubar or buttonbar. Instead, the GTK-based application follows the Gnome operating principle and integrates all controls of interest in the titlebar (Figure 8).
The Add Files button in the top left corner takes you to a file manager where you can select the image files to be processed. Metadata Cleaner then displays them in a list, with the number of identified Exif tags highlighted in red in a column on the right. Clicking on the rightmost arrow after each file icon opens a detailed display of the metadata embedded in the respective image file. The arrow pointing to the left in the titlebar takes you back to the file display.
To remove the metadata from all of the loaded files, simply press the big red Clean button bottom right in the program window. Metadata Cleaner will suggest creating a backup copy and then it will delete all metadata it finds without further ado. The application does not automatically create any backup copies of the originals, so the metadata cannot be reconstructed later.
If you click on the gear icon to the left of the Clean button, a small dialog opens in which you can switch on a Superficial cleanup via a slider. This mode does not completely remove the metadata from the respective file, but tries to preserve functionally relevant metadata. The Superficial cleanup is best suited for file formats such as PDF, where you can also make changes. Modifications such as text changes in a PDF or image compression may be controlled by the metadata and will be lost if the meta tags are missing. Consequently, you should not delete all the metadata for these types of file formats. The slider effects all files stored in the program window. Cleaning up the files takes some time, depending on the number.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4