How to Remove Sensitive Content from Your Photos, Documents in Ubuntu / Debian Linux

Photos, Documents, or Spreadsheets may have sensitive information you may not want to disclose it.

Got photos, videos or other files to share to public? These files may contain sensitive information that you may not want to disclose it!

Photos and videos may contain camera record data about when and where they were taken and which device was used. And, office applications automatically add author and company information to documents and spreadsheets. These are metadata included in files. Some may include sensitive information so we want to remove them. And, here’s how to the trick in Linux!

Remove Metadata from files in Linux:

GNOME has a modern and easy to use metadata cleaner app available to install in most Linux systems via Flatpak package.

Step 1: Install Metadata Cleaner.

Firstly, search for and open “terminal” from activities overview screen.

a.) Install the Flatpak daemon:

The Flatpak daemon is pre-installed out-of-the-box in some Linux, e.g., CentOS 7 and Linux Mint 20. When terminal opens, run one of the commands below to install the Flatpak daemon first.

  • For Ubuntu, Debian and their downstream Linux, run command:
    sudo apt install flatpak
  • Fedora user may run command to install the daemon:
    sudo dnf install flatpak
  • And for Arch, Manjaro Linux, etc, use command:
    sudo pacman -S flatpak

b.) Install Metadata cleaner app:

After that, install the app as Flatpak using command:

flatpak install https://dl.flathub.org/repo/appstream/fr.romainvigier.MetadataCleaner.flatpakref

Step 2: Clear Metadata from Your Files:

Next, search for and open the app from your system start menu or activities overview screen.

Open the app

Finally, use the header button to open your photos, videos, documents, etc via the cleaner. It will indicate how many metadata each file include, and allows to view the detailed information. Simply click on the bottom “Clean” button will clear all the metadata.

Import files, view metadata detail, and clear them

NOTE: There’s an “Lightweight Cleaning” option in setting wheel to prevent from altering the data of your files.

By default, the removal process might alter a bit the data of your files, in order to remove as much metadata as possible. For example, texts in PDF might not be select-able anymore, compressed images might get compressed again…

The lightweight mode, while not as thorough, will not make destructive changes to your files.

Merilyn Ne
Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.