
If you work with images, PDFs, or media files on a Linux server, metadata can become your biggest privacy risk or your most useful audit trail. ExifTool is the command-line utility sysadmins and developers trust to read, write, and strip metadata across 100+ file formats including EXIF, GPS, XMP, ID3, and PDF. This guide shows you how to install ExifTool on Ubuntu 26.04 using two proven methods: the APT package for most users and the upstream archive for those who need the latest version.
You will also learn how to verify the install, use it in real workflows, keep it updated, remove it cleanly, and fix the most common problems. Every step includes an explanation of why it matters, not just the command to run.
What Is ExifTool and Why Should Linux Users Care
ExifTool is an open-source Perl-based application developed by Phil Harvey. It lets you read, write, copy, and delete metadata embedded inside files. That means you can inspect GPS coordinates in a JPEG, strip author information from a PDF before publishing it, or rename 500 photos by their creation date without touching a single file manually.
Here is what ExifTool can process out of the box:
- EXIF data: camera make, model, aperture, shutter speed, ISO, date taken
- GPS coordinates: latitude, longitude, altitude
- XMP metadata: editing history, keywords, rights, author
- ID3 tags: audio file artist, album, track title
- PDF metadata: creator, producer, keywords
- IPTC, GeoTIFF, FlashPix, ICC Profile and dozens more formats
The reason this matters on Ubuntu specifically is that most server environments run headless. There is no GUI to open image properties. ExifTool fills that gap completely. It runs in scripts, CI/CD pipelines, cron jobs, and Streamlit dashboards just as well as it runs interactively in a terminal.
On Ubuntu 26.04 (codename Resolute), the APT package ships ExifTool version 13.50. The official upstream site may carry a newer release. Knowing the difference between these two sources, and when each one is appropriate, will save you headaches down the road.
Prerequisites for This Ubuntu 26.04 Setup
Before you run a single command, make sure the following conditions are met:
- Operating system: Ubuntu 26.04 LTS (Resolute), fully booted and network-connected
- User privileges: A regular user account with
sudoaccess - Terminal access: Local terminal, GNOME Terminal, or SSH session
- Internet connection: Required to download packages from Ubuntu repositories or the upstream ExifTool archive
- Optional:
wgetandca-certificatesif you choose the upstream archive method (covered in Method 2) - Disk space: Less than 25 MB free space required for either install path
If you are unsure whether your account has sudo access, run this command:
sudo whoami
The expected output is root. If you see a permission denied error, contact your system administrator to grant sudo privileges before continuing.
Understanding the Two Installation Methods
Not all Ubuntu users need the same version of ExifTool. Ubuntu 26.04’s Universe repository ships version 13.50 via APT. The official ExifTool website may have released version 13.59 or newer.
Here is a quick comparison to help you choose:
| Method | Package Source | Command Name | Update Path | Best For |
|---|---|---|---|---|
| APT package | Ubuntu Universe repo | exiftool |
Automatic via apt upgrade |
Most users, production servers |
| Upstream archive | Official exiftool.org | exiftool-latest |
Manual or update helper script | Users needing newer tag support |
The good news: both methods can coexist on the same machine. They use different command names and install to different filesystem paths, so there is no conflict. Start with APT. Add the upstream method only if you specifically need a newer version.
Step 1: Update Your System Package Index
Before installing anything, refresh APT’s local package cache.
sudo apt update
Why this matters: APT maintains a local snapshot of what packages are available. This snapshot goes stale over time. If you skip apt update, APT may try to install an outdated cached version or throw an error saying the package cannot be found. On a freshly installed Ubuntu 26.04 server, running apt update is especially important because the Universe repository index may not have been downloaded yet.
Expected output looks like this:
Hit:1 http://archive.ubuntu.com/ubuntu resolute InRelease
Hit:2 http://archive.ubuntu.com/ubuntu resolute-updates InRelease
...
Reading package lists... Done
No errors here means APT is ready for the next step.
Step 2: Enable the Universe Repository (If Not Already Active)
The libimage-exiftool-perl package lives in Ubuntu’s Universe component. Most Ubuntu 26.04 installations have Universe enabled by default, but minimal or cloud images sometimes do not.
Check if the package candidate exists:
apt-cache policy libimage-exiftool-perl
If the output shows Candidate: 13.50+dfsg-1, Universe is enabled and you can skip to Step 3.
If the output shows Candidate: (none), enable Universe and refresh the package index:
sudo apt install software-properties-common
sudo add-apt-repository --yes universe
sudo apt update
Why this matters: Ubuntu splits its repository into components: Main (supported by Canonical), Restricted (proprietary drivers), Universe (community-maintained), and Multiverse (restricted licenses). ExifTool is community-maintained Perl software, so it lives in Universe. If Universe is disabled, APT has no knowledge of the package at all and returns a “unable to locate package” error that confuses beginners.
After enabling Universe, run apt-cache policy libimage-exiftool-perl again to confirm the candidate version appears before proceeding.
Step 3: Install ExifTool via APT on Ubuntu 26.04
This is the recommended method for the majority of users. APT handles the install, dependency resolution, and future upgrades automatically.
Install the Package
sudo apt install libimage-exiftool-perl
Why this package name and not just “exiftool”: On Debian-based systems including Ubuntu, ExifTool is distributed as a Perl module library. Its official Debian packaging name is libimage-exiftool-perl. While typing sudo apt install exiftool may work as an alias on Ubuntu 26.04, the canonical package name tracked by the package manager is libimage-exiftool-perl. Using the canonical name ensures dpkg, apt show, and upgrade commands all behave predictably.
APT will prompt you to confirm. Type Y and press Enter. The install pulls in Perl and related dependencies automatically.
Verify the Installation
Run three verification commands after the install finishes:
exiftool -ver
command -v exiftool
dpkg -S "$(command -v exiftool)"
Why run all three commands and not just one:
exiftool -verconfirms the binary runs and returns the active version numbercommand -v exiftoolconfirms the shell can find the binary in your PATHdpkg -Sconfirms the binary is owned and tracked by a package, meaning APT manages its future upgrades
Expected output on a clean Ubuntu 26.04 install:
13.50
/usr/bin/exiftool
libimage-exiftool-perl: /usr/bin/exiftool
If all three lines return correct output, ExifTool is installed and ready to use via APT. You can stop here unless you need a newer upstream version.
Step 4: Install the Latest ExifTool from the Upstream Archive (Optional)
Use this method when Ubuntu 26.04’s APT version (13.50) does not support a file format, metadata tag, or security fix that your workflow requires. This method installs ExifTool under your home directory and does not replace the APT-managed system binary.
Install Download Prerequisites
sudo apt update && sudo apt install wget ca-certificates
Why: The wget utility handles the authenticated HTTPS download from ExifTool’s official site and the SourceForge archive mirror. The ca-certificates package ensures TLS certificate validation works correctly. Without valid CA certificates, the HTTPS connection fails with an SSL error. Both packages are usually already present on Ubuntu 26.04, but this command ensures they are there before proceeding.
Download the Archive and Verify the Checksum
workdir="$(mktemp -d)"
cd "$workdir"
version="$(wget -qO- https://exiftool.org/ver.txt | tr -d '[:space:]')"
archive="Image-ExifTool-${version}.tar.gz"
wget -O "$archive" "https://downloads.sourceforge.net/project/exiftool/${archive}"
expected_sha256="$(wget -qO- https://exiftool.org/checksums.txt | grep -o "SHA2-256(${archive})= [0-9a-f]*" | awk '{print $2}')"
if [ -z "$expected_sha256" ]; then
echo "Checksum not found for $archive" >&2
exit 1
fi
printf '%s %s\n' "$expected_sha256" "$archive" | sha256sum -c -
Why checksum verification is non-negotiable: You are downloading a binary from the internet. Verifying the SHA-256 hash against ExifTool’s officially published checksum file confirms two things: the file was not corrupted during transit, and no one tampered with it between the source and your server. If sha256sum -c - reports anything other than OK, stop immediately. Delete the working directory and re-download. Never extract or run software that fails a checksum check.
A successful verification looks like this:
Image-ExifTool-13.59.tar.gz: OK
Extract and Install to a User-Local Directory
install_dir="$HOME/.local/opt/exiftool-latest"
wrapper="$HOME/.local/bin/exiftool-latest"
gzip -dc "$archive" | tar -xf -
mkdir -p "$(dirname "$install_dir")" "$(dirname "$wrapper")"
rm -rf -- "$install_dir"
mv "Image-ExifTool-${version}" "$install_dir"
cat > "$wrapper" <<'WRAPPER'
#!/bin/sh
exec "$HOME/.local/opt/exiftool-latest/exiftool" "$@"
WRAPPER
chmod +x "$wrapper"
Why install to ~/.local/ instead of /usr/bin: Installing to a user-local directory keeps the system’s APT-managed binaries untouched. The ~/.local/opt/ path follows the XDG Base Directory specification, which is the standard for user-installed software on modern Linux. If you later remove or upgrade the APT package, nothing breaks. The two installs stay completely independent of each other.
Add the Directory to Your PATH and Verify
export PATH="$HOME/.local/bin:$PATH"
command -v exiftool-latest
exiftool-latest -ver
Expected output (your username will differ):
/home/youruser/.local/bin/exiftool-latest
13.59
Clean up the temporary working directory:
cd "$HOME"
rm -rf -- "$workdir"
To make the PATH change permanent, add the export line to your ~/.bashrc or ~/.profile:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Step 5: Verify ExifTool Works with a Live Test
Do not assume the tool works just because the install completed without errors. Run a quick functional test before using ExifTool on important files.
Test with a Safe System File
exiftool -FileName -Directory -MIMEType /etc/os-release
Why use /etc/os-release as the test target: This file is always present on any Ubuntu system, cannot be damaged by a read operation, and requires no test image to be available. It gives you a clean, safe way to confirm ExifTool runs before pointing it at production media files.
Expected output:
File Name : os-release
Directory : /etc
MIME Type : text/plain
Test with an Image File
If you have a JPEG available:
exiftool photo.jpg
ExifTool returns all readable metadata tags. For a typical smartphone photo, you will see 50 or more fields including camera make, model, GPS coordinates, date taken, aperture, shutter speed, ISO, and image dimensions.
Export Metadata as JSON
exiftool -j photo.jpg > metadata.json
cat metadata.json
Why JSON output matters for developers and sysadmins: JSON is machine-readable. Python scripts, Streamlit dashboards, CI pipelines, and log aggregation systems can directly consume this output for automated metadata auditing without any additional parsing. This is one of ExifTool’s most powerful features for integration workflows.
Step 6: Configure ExifTool on Ubuntu 26.04 for Real Use Cases
Once installed, ExifTool is useful for a wide range of daily tasks. Here are the most practical ones for Linux users and sysadmins.
Strip All Metadata from a File
exiftool -all= photo.jpg
Why strip metadata: Images shared publicly often contain GPS coordinates, device serial numbers, software version strings, and user account names. Removing this data before upload protects user privacy and is a requirement under GDPR and similar data protection regulations. By default, ExifTool creates a backup file named photo.jpg_original before modifying the original.
If you want to skip the backup:
exiftool -overwrite_original -all= photo.jpg
Use -overwrite_original only when you are certain you do not need the backup.
Batch Process an Entire Directory
exiftool -Copyright="Your Name 2026" *.jpg
Why batch processing is essential: Manually editing metadata on hundreds of files is error-prone and time-consuming. ExifTool processes entire directories in a single command, applying the same tag change to every file that matches the pattern. For photographers, media teams, and anyone managing large file archives, this is the core reason ExifTool exists.
Rename Files by Creation Date
exiftool '-FileName<${DateTimeOriginal}.%e' -d "%Y%m%d_%H%M%S" *.jpg
Why date-based renaming matters: Files named IMG_0001.jpg are not sortable, searchable, or meaningful outside of the original device. Renaming files by their DateTimeOriginal metadata makes archives chronologically organized and portable across systems. The filename now carries the truth embedded in the photo itself, not a filesystem timestamp that resets when you copy files.
Extract GPS Coordinates
exiftool -GPSLatitude -GPSLongitude photo.jpg
For decimal degrees output (easier for mapping APIs):
exiftool -GPSLatitude -GPSLongitude -n photo.jpg
Why this matters for server workflows: If you process user-uploaded images, extracting GPS coordinates allows you to build location-aware features, geofencing checks, or privacy compliance pipelines that automatically flag or strip location data from public uploads.
Step 7: Keep ExifTool Updated on Ubuntu 26.04
Update the APT Package
sudo apt update
sudo apt install --only-upgrade libimage-exiftool-perl
Why use --only-upgrade instead of plain install: The --only-upgrade flag tells APT to upgrade the package only if it is already installed. Without this flag, running apt install on a package that is not installed would install it, which may not be your intention in an automated script or scheduled cron job. Using --only-upgrade makes the command safe to run in automation.
Expected output on an already-current system:
libimage-exiftool-perl is already the newest version (13.50+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Check and Update the Upstream Archive Version
latest="$(wget -qO- https://exiftool.org/ver.txt | tr -d '[:space:]')"
installed="$(exiftool-latest -ver)"
printf 'latest=%s installed=%s\n' "$latest" "$installed"
Why compare before updating: Re-running the full download script wastes bandwidth and risks interrupting a working setup. Comparing version strings first lets you make an informed decision. If the values match, nothing needs to change.
Troubleshooting ExifTool on Ubuntu 26.04
Error: “command not found” After Installation
What causes this: The APT install provides the exiftool command. The upstream archive install provides exiftool-latest. Using the wrong command name after the wrong install method is the most common source of this error.
Run this diagnostic first:
for cmd in exiftool exiftool-latest; do
if command -v "$cmd" >/dev/null 2>&1; then
printf '%s -> %s\n' "$cmd" "$(command -v "$cmd")"
else
printf '%s -> not found\n' "$cmd"
fi
done
If exiftool-latest exists but is not found, your ~/.local/bin directory is not in PATH:
export PATH="$HOME/.local/bin:$PATH"
exiftool-latest -ver
Error: “Unable to Locate Package libimage-exiftool-perl”
What causes this: The Universe repository component is disabled, or the local APT index is stale.
Enable Universe and refresh:
sudo add-apt-repository --yes universe
sudo apt update
Then confirm the package candidate appears:
apt-cache policy libimage-exiftool-perl
The candidate field should show 13.50+dfsg-1 on Ubuntu 26.04.
Error: Checksum Verification Fails During Upstream Install
What causes this: The downloaded archive does not match the SHA-256 hash published on exiftool.org. This can happen due to network corruption, a partial download, or a version mismatch between the ver.txt and checksums.txt files during a rapid upstream release cycle.
Never extract a failed archive. Delete the working directory and start fresh:
cd "$HOME"
rm -rf -- "$workdir"
Rerun the download block from scratch. If the failure repeats, wait a few hours. ExifTool releases sometimes stagger their publication of the checksum file by a short window.
Error: APT Package Version Too Old for Your Use Case
What causes this: Ubuntu 26.04 LTS freezes package versions for stability. ExifTool 13.50 may lack support for newer camera RAW formats, file types introduced after Ubuntu’s package freeze date, or fixes for issues discovered after release.
Solution: Install the upstream archive method alongside the APT package. Use exiftool for general system-managed tasks and exiftool-latest for workflows that require newer tag support. Both commands coexist without conflict.
Error: “wrapper executable” Test Fails After Upstream Install
What causes this: The wrapper script in ~/.local/bin/exiftool-latest may be missing its execute permission, or the $HOME/.local/opt/exiftool-latest/exiftool script was not extracted correctly.
Check both paths:
test -x "$HOME/.local/bin/exiftool-latest" && echo "wrapper: OK"
test -x "$HOME/.local/opt/exiftool-latest/exiftool" && echo "upstream script: OK"
If either check fails, rerun the upstream archive install section from the extraction step.
Removing ExifTool from Ubuntu 26.04
Remove the APT Package
sudo apt remove libimage-exiftool-perl
sudo apt autoremove
Why run autoremove separately: apt remove uninstalls the named package but leaves behind Perl dependencies that were pulled in as requirements. Running autoremove cleans up these orphaned packages. In production environments, review the autoremove candidate list before confirming, since some dependencies may be shared with other installed packages.
Confirm the removal:
hash -r
command -v exiftool || echo "exiftool removed"
Remove the Upstream Archive Install
rm -rf -- "$HOME/.local/opt/exiftool-latest" \
"$HOME/.local/bin/exiftool-latest" \
"$HOME/.local/bin/update-exiftool-latest"
hash -r
Why run hash -r after removing binaries: Your shell caches command-to-path mappings in memory for performance. After deleting a binary, the shell’s cached path still points to the now-deleted file location. Running hash -r flushes this cache so the shell rescans PATH fresh on the next command lookup.