Deleting metadata from files
ExifTool
The cross-platform ExifTool [4] has become the quasi-standard for editing metadata. The command-line tool has a powerful command set and can handle a wide variety of image and video formats. ExifTool's developers provide an easily understandable table [5] that lists the editing options for each format.
ExifTool can be found in the repositories of most common Linux distributions; consequently, it can usually conveniently be set up via the respective package manager. After installing ExifTool, in the simplest case, you can display a file's existing Exif data by entering the command:
exiftool FILE
The application takes all the existing metadata into account, so the output is usually quite long and confusing (Figure 2).
To save the most important metadata separately, redirect the output to a text file (Listing 1, line 1). In addition to the metadata, the Exif tags are also included in the file. To edit individual Exif tags, use the command from line 2 and then verify the modified tag with the command from line 3. As a result, you get a single line with the desired Exif tag and its value. If you want to delete all the tags to protect your privacy prior to publishing an image on the Internet, enter the command from the line 4 at the prompt.
Listing 1
Typical ExifTool Commands
01 $ exiftool --common FILE FILE.txt 02 $ exiftool -EXIF TAG='TAG CONTENT' FILE 03 $ exiftool --EXIF TAG FILE 04 $ exiftool -all=FILE
jExifToolGUI
Due to the complexity of the editing options and the large volume of metadata, ExifTool requires a longer learning curve. It is far easier to edit metadata using the jExifToolGUI [6], which provides a graphical user interface (GUI). The Java-based application requires the installation of ExifTool and version 11 of the Java Runtime Environment, which can be easily installed from the repositories of almost all popular distributions.
After a somewhat slow start, jExifToolGUI comes up with a clear-cut interface. On the left, below the menubar and buttonbar, you will find a pane that displays small thumbnails of the files discovered by jExifToolGUI. To the right of this pane, you can view and edit the metadata of the selected files using the tabs at the top of this pane.
To get started, click on the folder icon in the top left corner of the window and select the desired folder in the file manager that then opens. jExifToolGUI then reads the files it discovers and displays them one below the other as thumbnails in the pane on the left. After clicking on one of the files, the associated metadata appears in a table on the right in the View Data tab (Figure 3).
Using the Edit Data tab, you can then modify the existing data. A second tab bar, which categorizes the corresponding data, lets you to reach the data quickly without having to trudge through a long, confusing table of Exif tags and their values. The Exif tags belonging to the respective category appear one below the other on the individual tabs; you can enter the modified values in corresponding input fields. To the right, you click checkboxes to save the new values; by default, jExifToolGUI checks all the boxes for saving the values.
After completing the modifications, transfer the new metadata to the respective image(s) in each tab by clicking the Copy to selected image(s) and save button at the bottom of the active dialog. jExifToolGUI will then transfer the modified data to the correct location in the metadata inventory. If necessary, you can also simply copy existing data to the appropriate tab category by clicking Copy from selected images at the bottom of the relevant editing segment after selecting an image. By selecting this option, you must reread the data in each category for the selected images.
Metadata | Remove metadata saves you from having to laboriously go through the individual editing dialogs one by one to remove metadata. Clicking on it opens a new dialog in which you select the categories in question by checking the matching options (Figure 4). At the same time, the default Back up originals option ensures that backups of the original data are preserved.
After clicking OK and confirming the prompt, jExifToolGUI removes the metadata from the image header. If you then reselect the image and reread the metadata using the Copy from selected images button, you will see empty fields for the corresponding Exif tags.
ExifCleaner
ExifCleaner [7] also relies on ExifTool as the basis for reading and removing Exif data. Due to its simple user interface, ExifCleaner is best suited for users who only occasionally want to remove metadata from images. The program cannot edit metadata. You will find RPM and DEB binary packages for ExifCleaner on GitHub, as well as a generic AppImage package. The source code is also available on GitHub.
ExifCleaner opens a spartan-looking empty window with only one menubar. Drag the image files whose metadata you want to remove into the empty space. In two columns, the tool shows how many Exif values it has found in each image file and how many values will remain after the removal process (Figure 5). You can only see the number of read-only values that cannot be removed, but not which Exif tags the values belong to.
ExifCleaner automatically starts removing the metadata immediately after loading the files. Since the tool does not back up the original files, the deleted metadata cannot be reconstructed. Take care when selecting and transferring image files to ExifCleaner to avoid data loss.
Contrary to what the program name suggests, ExifCleaner does not just manipulate image files, but also video formats such as M4A, MOV, QT, and MP4. In addition, ExifCleaner removes all metadata except for read-only metadata (which cannot be deleted) from PDF files.
« 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
-
2024 Open Source Professionals Job Survey Now Open
Share your expectations regarding open source jobs.
-
Arch Linux 2023.12.01 Released with a Much-Improved Installer
If you've ever wanted to install Arch Linux, now is your time. With the latest release, the archinstall script vastly simplifies the process.
-
Zorin OS 17 Beta Available for Testing
The upcoming version of Zorin OS includes plenty of improvements to take your PC to a whole new level of user-friendliness.
-
Red Hat Migrates RHEL from Xorg to Wayland
If you've been wondering when Xorg will finally be a thing of the past, wonder no more, as Red Hat has made it clear.
-
PipeWire 1.0 Officially Released
PipeWire was created to take the place of the oft-troubled PulseAudio and has finally reached the 1.0 status as a major update with plenty of improvements and the usual bug fixes.
-
Rocky Linux 9.3 Available for Download
The latest version of the RHEL alternative is now available and brings back cloud and container images for ppc64le along with plenty of new features and fixes.
-
Ubuntu Budgie Shifts How to Tackle Wayland
Ubuntu Budgie has yet to make the switch to Wayland but with a change in approaches, they're finally on track to making it happen.
-
TUXEDO's New Ultraportable Linux Workstation Released
The TUXEDO Pulse 14 blends portability with power, thanks to the AMD Ryzen 7 7840HS CPU.
-
AlmaLinux Will No Longer Be "Just Another RHEL Clone"
With the release of AlmaLinux 9.3, the distribution will be built entirely from upstream sources.
-
elementary OS 8 Has a Big Surprise in Store
When elementary OS 8 finally arrives, it will not only be based on Ubuntu 24.04 but it will also default to Wayland for better performance and security.