Every photo your phone takes is quietly tagged: the camera, the exact date and time, the settings, and very often the GPS coordinates of where you were standing. Post that file anywhere without stripping it and you may be publishing your home address along with the picture. For a task that’s all about privacy, uploading the photos to an online “metadata remover” defeats the purpose — you’d be handing the exact files to a stranger’s server.
ExifTool in WSL does it properly: view what’s hidden in a file, strip it from one photo or a whole folder, and verify it’s gone — all locally, for free, nothing uploaded.
If WSL isn’t set up, start with the WSL install guide.
Install ExifTool
sudo apt update && sudo apt install -y libimage-exiftool-perl
The command is exiftool. Confirm it:
exiftool -ver
See what’s actually in your photos
Before removing anything, look at what’s there. This prints every tag in a file:
exiftool photo.jpg
To zero in on location, just ask for the GPS tags:
exiftool -gps:all photo.jpg
If that returns coordinates, that photo is carrying your location. Seeing it first makes the cleanup concrete.
Before you strip anything
- WSL installed and ExifTool available
- A copy of your photos in a working folder
- Checked one file with exiftool to see what's stored
Strip all metadata from one file
The -all= operation clears every metadata tag:
exiftool -all= photo.jpg
By default ExifTool saves a backup as photo.jpg_original. That’s a safety net — your original metadata is recoverable until you delete it. To skip the backup and overwrite directly:
exiftool -all= -overwrite_original photo.jpg
Strip a whole folder in bulk
Point ExifTool at a directory with -r (recursive) and it processes everything below it. To strip all metadata from every JPG and PNG in a folder and its subfolders:
exiftool -all= -overwrite_original -r .
To limit it to specific types, name the extensions:
exiftool -all= -overwrite_original -ext jpg -ext png -r .
ExifTool prints a summary of how many files it updated, so you get confirmation the batch ran.
Remove only the GPS location
Sometimes you want to keep the camera info and timestamps but drop the location. Clear just the GPS tags:
exiftool -gps:all= photo.jpg
Bulk version across a folder:
exiftool -gps:all= -overwrite_original -r .
ExifTool commands for metadata cleanup
| exiftool file.jpg | Show all metadata in a file |
|---|---|
| exiftool -gps:all file.jpg | Show just GPS/location tags |
| exiftool -all= file.jpg | Strip all metadata (keeps _original) |
| exiftool -all= -overwrite_original f | Strip all, no backup file |
| exiftool -gps:all= file.jpg | Remove only location, keep the rest |
| exiftool -all= -overwrite_original -r . | Strip everything in a folder tree |
Verify it worked
Don’t assume — check. After stripping, re-run the viewer; a clean file shows almost nothing:
exiftool photo.jpg
If location was your concern, confirm specifically:
exiftool -gps:all photo.jpg
No output for the GPS tags means the location is gone.
Wrapping up
ExifTool turns metadata cleanup into a few clear commands: exiftool photo.jpg to see what’s hidden, exiftool -all= to strip it, -gps:all= to remove just the location, and -r to do it across a whole folder. Verify with the viewer afterward so you know it actually worked.
It’s free, it batches, and it runs entirely in WSL — so the photos you’re trying to keep private never get uploaded. While you’re optimizing images, stripping metadata also slims the files; see compress images without losing quality for the rest of that workflow.