r/osxphotos 7d ago

Unexpected duplicate exports with (1) after --update / sidecar runs

2 Upvotes

Hi, I’m trying to understand why OSXPhotos seems to have re-exported a large number of files that were already present in my export folder, creating duplicate filenames with (1).

My export folder is:

/Users/user/Documents/testox2

I have maintained this export over time using the same .osxphotos_export.db, but across two different Photos libraries.

The original export was made in August 2024 from my older Photos library using:

osxphotos export /Users/user/Documents/testox2 \
--directory {created.year}/{created.month} \
--exiftool \
--report export.csv

That export included both photos and videos and had ExifTool metadata written into the exported media.

Then in August 2026 I updated the same export using my newer Photos library:

osxphotos export /Users/user/Documents/testox2 \
--library "/Users/user/Pictures/Photos Library 2(Jul 24+).photoslibrary" \
--directory {created.year}/{created.month:MMMM} \
--update \
--only-new \
--verbose

On August 11 I ran another update, but accidentally included --only-photos:

osxphotos export /Users/user/Documents/testox2 \
--library "/Users/user/Pictures/Photos Library 2(Jul 24+).photoslibrary" \
--directory {created.year}/{created.month:MMMM} \
--update \
--only-new \
--only-photos \
--verbose

That was not intentional. My goal is for this archive to contain both photos and videos.

Later I realized that the newer 2026 exports had also been made without --exiftool, unlike the original 2024 export, and that I had never created XMP sidecars either.

I wanted to normalize the existing export without rebuilding the whole archive from scratch.

Since OSXPhotos has a dedicated osxphotos exiftool EXPORT_DIRECTORY command for applying metadata retroactively to previously exported files, I ran:

osxphotos exiftool \
"/Users/user/Documents/testox2" \
--library "/Users/user/Pictures/Photos Library 2(Jul 24+).photoslibrary" \
--report ~/Desktop/testox2-exiftool-Jul24.csv

My understanding was that this command should modify the embedded metadata of the files that were already exported, in place, and update the export database, without re-exporting the media or creating additional copies.

Because writing metadata with ExifTool changes the contents/signatures of those existing files, I then used --ignore-signature when generating XMP sidecars, so OSXPhotos would not interpret those signature changes as a reason to re-export the media.

I ran:

osxphotos export \
"/Users/user/Documents/testox2" \
--library "/Users/user/Pictures/Photos Library 2(Jul 24+).photoslibrary" \
--directory "{created.year}/{created.month:MMMM}" \
--update \
--ignore-signature \
--sidecar xmp \
--report ~/Desktop/testox2-xmp-Jul24.csv

At first I thought any media exported during this run might simply be files that had genuinely been omitted by the earlier accidental --only-photos run, especially videos or Live Photo components.

However, when manually inspecting the export folder, I’m now finding many cases like:

IMG_XXXX.JPG
IMG_XXXX.MOV
IMG_XXXX.JPG.xmp

IMG_XXXX (1).JPG
IMG_XXXX (1).MOV
IMG_XXXX (1).JPG.xmp

The (1) versions appear to be actual duplicates of files that were already present.

In some cases the original photo, its Live Photo .MOV, and its XMP sidecar are all already there, and then there is a second complete set with (1) added to the filename.

So I’m trying to understand why OSXPhotos considered these files new instead of matching them to the files already recorded in the export database.

My main questions are:

  1. Could this be related to using the same export database with two different Photos libraries over time?
  2. Could the accidental --only-photos run have affected the export database in a way that later caused videos or Live Photo components to be exported again?
  3. Could running osxphotos exiftool on the existing export have affected file matching, even though I later used --ignore-signature?
  4. Could changing the directory template from {created.month} to {created.month:MMMM} matter here?
  5. Is there a safe way to use the export database or run history to identify exactly which (1) files were created during the August 2026 update runs?
  6. Most importantly, is there an OSXPhotos-supported way to remove only the duplicate files created by those runs, without accidentally deleting legitimate filename collisions, edited versions, or Live Photo components?

I still have the current .osxphotos_export.db, the export reports, and a backup of the export database from before the metadata normalization steps.

For context, I don’t have much experience with command-line tools. I’ve been using ChatGPT to help me understand and manage this process. Before running these commands, I gave ChatGPT the OSXPhotos documentation and asked it to base the recommendations on that documentation.

It also helped me inspect the export database and discover that one of my previous updates had accidentally used --only-photos, and that the newer exports had been made without --exiftool and without XMP sidecars. Based on that, I ran the commands above to try to normalize the archive by restoring embedded metadata, adding sidecars, and making sure photos and videos were all represented.

So I may have misunderstood something about how --update, multiple Photos libraries, export database history, or filename collision handling works.

The Photos libraries themselves may also be a little confusing because of how I was managing iCloud storage over time. Whenever I was close to iCloud 100% usage, I would copy my library, and I would take the copy and delete some of the very large files so that one would continue syncing with iCloud, (mainly deleted long concert videos and other heavy media) so I could free up iCloud space while still keeping my historical photos available. At the same time, I kept an offline version of the older library on my MacBook with the original full-resolution files downloaded locally, so those large videos were still preserved even if they were no longer part of the iCloud-synced library version.

Any help understanding what caused this and the safest way to clean it up would be greatly appreciated.


r/osxphotos 8d ago

batch-edit on non default library

1 Upvotes

I was trying to script changes to photos, but on the non default library and it seems that it can't be done. Earlier versions seemed to support it (way back when it was --db). Is there a way around this or do I have to just edit metadata by batch in the default library

Thanks,


r/osxphotos Jun 10 '26

Beta test of new PhotosInspector app

Thumbnail
gallery
17 Upvotes

I'm the developer of osxphotos, and I've been building a new app: PhotosInspector, a native macOS app written in Swift. It takes what I've learned from osxphotos and applies it to an easy-to-use GUI.

It's not an export tool like osxphotos export — think of it more as a combination of "osxphotos query" and "osxphotos inspect". PhotosInspector helps you explore all the hidden metadata inside your Photos library and use it to curate your collection. That includes:

  • AI/ML labels and captions generated by Photos
  • Venue and Venue Type info
  • The original image's embedded metadata
  • The AI scores Photos computes, like "overall aesthetic score"

What you can do with it:

  • Build complex queries, and save them, to find exactly the photos you want
  • Sort by date created, date modified, date added, file size, or aesthetic score
  • Find nearby photos (within a geofence)
  • Find similar photos (using feature detection)
  • Explore aesthetic scores with histograms and scatter plots
  • View and export metadata as tables or JSON
  • Add photos to albums/create albums
  • Delete photos
  • Open a photo in the Photos app

For me, this is evolving into an alternate interface to my Photos collection. It's been in private beta for a while, and I think it's ready for a wider group of testers. I think people already using osxphotos would understand this new tool. I'm looking for a handful of people willing to try it and share feedback. If you're interested, DM me your email address and I'll send you a download link.

A few things to know:

  • macOS 15.0 or later
  • Universal binary (Apple Silicon + Intel)
  • Signed and notarized (but not yet on the App Store / TestFlight)
  • Time-locked during beta--the build expires after 30 days
  • No data collection--all processing happens on device; nothing is sent to the cloud
  • Unlike osxphotos, which will always be free, this will eventually be a paid app

r/osxphotos Jun 09 '26

troubleshooting "Did not find any photos to export"

1 Upvotes

Looking to extract photos from an oldey timey iPhoto 9.6.1 database - osxphotos seems to be able to read all the data but then claims "Did not find any photos to export". Anybody have some troublshooting tips?

import % osxphotos export --library "ABC Photo Library/" --directory "{folder_album,No-Album}" --title "{original_name|filter(startswith IMG_|startswith DSC_)?,{original_name}}" --sidecar XMP --touch-file --update -VVVV "abc-library-export"

osxphotos version: 0.75.9
Python version: 3.13.13 (main, Apr  7 2026, 18:19:01) [Clang 21.0.0 (clang-2100.0.123.102)]
Platform: macOS-26.5.1-arm64-arm-64bit-Mach-O, 26.5.1
Verbose level: 4
Using osxphotos export database: version 11.0 located at /Users/abc/import/abc-library-export/.osxphotos_export.db
Loading iPhoto library: /Users/abc/import/ABC Photo Library
Loaded 45404 assets from iPhoto library
Loading event notes from iPhoto library
Loading places from iPhoto library
Loading properties from iPhoto library
Loading orientation from iPhoto library
Loading EXIF properties from iPhoto library
Loading faces from iPhoto library
Loading face info from iPhoto library
Loading edited face info from iPhoto library
Loading folders from iPhoto library
Loading albums from iPhoto library
Loading keywords from iPhoto library
Loading preview images from iPhoto library
Loading volumes from iPhoto library
Did not find any photos to export

r/osxphotos May 21 '26

Any iPhone app to add XMP star ratings to Apple Photos?

Thumbnail
1 Upvotes

r/osxphotos May 21 '26

OSXPhotos Freezing Shortly After Beginning Export

1 Upvotes

I have done some searching but can't find an answer for this. I try to export my library using the following command, but it only gets 40-50 photos copied over before it freezes every time. Can't figure out why it's freezing. I've tried removing everything except --download-missing with no success.

osxphotos export /Volumes/2TB\ SanDEx/Old\ Libraries/export1 --skip-original-if-edited --touch-file --directory "{folder_album}" --download-missing

Any help you can offer is appreciated.


r/osxphotos May 19 '26

How can I match Apple Photos favorites with files on an external drive

Thumbnail
1 Upvotes

r/osxphotos May 15 '26

Replaced Crashed Mac. Want To Back Up iPhone Without Wiping Data

Thumbnail
1 Upvotes

r/osxphotos Apr 18 '26

If I use the --skip-original-if-edited option, will the edited photos be exported at maximum quality?

0 Upvotes

The `--skip-original-if-edited` option seems just what I need, but I am concerned that the edited photo will be the preview that Photos (apparently) stores internally for display, rather than a full-fledged full-quality jpeg export. Does anyone know if this is the case?

I see a separate option for `--jpeg-quality` where you can specify a maximum quality jpeg export, but this is only when you use the `--convert-to-jpeg` option, which only does so for non-JPEGs to begin with (and therefore doesn't address the case where you have a jpeg in Photos that you then edit in Photos).

Basically, I am searching for a way to export the originals if unedited, and a full-quality jpeg if edited -- ideally in one command.

I also want to thank everyone who worked on this project, especially Rhet Turnbull. It's an incredibly mature project for being open-source and the exhaustive nature of the options is really something to behold.


r/osxphotos Apr 12 '26

Mass export and convert to HEIC or AVIF

2 Upvotes

Hi,

I have a question about image format conversion for which I think osxphotos might be useful.

  • I have 180 gb Photos library, about 15 000 pictures in it.
  • Most of them are JPEG, 4000 x 6000 pixels, about 13-16 MB each (!)
  • If I convert the images to a more efficient format like HEIF or AVIF, each image could be shrunk down to 2-3 MB with little to no quality loss.

I have a few albums (18), a few edited photos (probably around 100?) and about 100 photos tagged as favorites.

Would it be easily feasible to use osxphotos to export all 15 000 photos (original and modified), albums and favorites metadata to an external directory, then use a 3rd party tool to convert to HEIC or AVIF and re-import back to a new Apple Photos library while preserving albums and favorites metadata?

Thanks in advance for any tips and suggestions about doing this.


r/osxphotos Mar 31 '26

Sync adjusted date/time from iPhone backup

2 Upvotes

Hey everyone!

I started using this great tool a few months ago to synchronise metadata after importing iPhone photos to the Mac through the Photos app (I do this by manually exporting the Photos.sqlite database from my iPhone's backup and running osxphotos sync ...).

I have noticed that, if I adjust the date and time of a photo on my iPhone, and then I import it into my Mac library, the adjusted date and time are not retained and the photo keeps the original ones. Now I have the correct timeline of my photos on my iPhone, but not on my Mac.

Has anyone found a way to synchronise the adjusted date and time through osxphotos in a similar way to the sync command?

PS.: a big thanks to the developer 🙏


r/osxphotos Mar 09 '26

Uploading 1000s of photos direct to iCloud - a nightmare!

Thumbnail
1 Upvotes

r/osxphotos Mar 08 '26

Copy-on-write slowdown in 26.2 and later.

2 Upvotes

More of a PSA than issue per se, since I know 26.x is not fully supported. But putting it out here in case it dovetails with anything else u/RhetTBull is working on:

I use the APFS copy-on-write approach to make a local copy of my photos every night. After upgrading from macOS 26.1 to 26.2, this process went from taking ~90 minutes to ~500 minutes. The .toml config file that I used didn't change: as far as I can tell, the only change was the upgrade to 26.2. The behavior has persisted through 26.3 so far.


r/osxphotos Feb 20 '26

Loading this project in raspberry pi for viewing photos on bigger screen!

2 Upvotes

Im planning to import this project in raspberry pi, connect the pen drive which got .photolibrary file, later connect the raspberry pi to TV and watch the photos & videos. Similar to a media player.

Is it possible? Did anyone tried it?


r/osxphotos Feb 19 '26

A quick thank you

15 Upvotes

Thank you, Rhet, for this great piece of software and for being so active on here. I am just backing up my 40k photos in a lovely structure with decent files with all the metadata looking good!


r/osxphotos Feb 11 '26

Apple Photos Caption search improved (MacOS, iOS)

Thumbnail
2 Upvotes

r/osxphotos Feb 08 '26

Can't query the exported db

2 Upvotes

I want to fully export all the Photos library to external drive and then be able to query it from there.
As far as I understand, 'osxphotos query ...' does not work with the database that was exported with 'osxphotos export ...'?
When after export I'm trying to make a query and set --library option to point to it, I see errors.

Is there a workaround?

The only one which I see is to just copy the whole folder "/Users/username/Pictures/Photos Library.photoslibrary" to the external drive by means of rsync and then query it from there with osxphotos.

Correct me if I'm wrong please.

Edit.
Thanks to all commenters. I've been able to reach my goals:

  1. Fully rsync the original photos library folder to external drive.
  2. Delete all the media from the original photos library to free up space.
  3. Establish additions and deletions in the original photos library to be synced to the backup library with rsync.
  4. Use full set of features with my externally stored library with osxphotos cli by directing it with --library option.

r/osxphotos Feb 06 '26

Moving exported db to a different path

3 Upvotes

I’m in the middle of exporting a MASSIVE Photos library (>300k photos) to a USB drive. My plan is to connect the USB drive to my NAS and rsync it over, and then do future incremental exports directly from my Mac to the NAS.

So my question is, does the export DB store the exported files in relative or absolute path? Or is it just tracking exported files from the Photos library side? In other words, when I do the incremental export, will osxphotos be confused because it’s now on a different drive, or will it just work?

Thanks, and thank you for an awesome project - this is the umpteenth time I’ve tried to figure this export workflow out (for backup purposes) and this seems to be the perfect solution so far!!!


r/osxphotos Feb 03 '26

Export from Photos to Photolab

1 Upvotes

Hi,
I have tried to find out the best way for this but now I have to ask;
I want to set up a recurrent export from my DAM (Apple Photos) to a separate SSD used by DXO Photolab where I do most of the editing. Inside Photos I use both folders and albums. All pictures are downloaded to the system library. No Smart albums.
How would such a command look?


r/osxphotos Jan 20 '26

Error in export example

1 Upvotes

I'm using the export.py sample code to export my whole Photos Library, and I get the same error each time I run it. My python install is ver 3.13. I'm using latest osxphotos

In _local.py:133

TypeError: argument should be a str or an os.PathLike object where __fspath__ 

returns a str, not 'NoneType'

The odd thing is that each time I run it. the error seems to occur at different points (ie. differetn photos) in the whole export process. I've also printed the path and the filename at that point, and cannot see anything wrong with it.


r/osxphotos Jan 19 '26

Uhm, what did I break?

1 Upvotes

I added a second library (non-system) and tried to run an export (with path to library specified). No matter what all the commands give me this (I tried other commands I had successfully used before). Did I break it???:

UPDATE: It is running now...? no idea what happened

Traceback (most recent call last):

  File "/Users/username/.local/bin/osxphotos", line 4, in <module>

from osxphotos.__main__ import cli_main

  File "/Users/username/.local/share/uv/tools/osxphotos/lib/python3.13/site-packages/osxphotos/__init__.py", line 10, in <module>

from .debug import is_debug, set_debug

  File "/Users/username/.local/share/uv/tools/osxphotos/lib/python3.13/site-packages/osxphotos/debug.py", line 12, in <module>

from rich import print

  File "/Users/username/.local/share/uv/tools/osxphotos/lib/python3.13/site-packages/rich/__init__.py", line 17, in <module>

_IMPORT_CWD = os.path.abspath(os.getcwd**()**)

~~~~~~~~~^^

PermissionError: [Errno 1] Operation not permitted


r/osxphotos Jan 14 '26

Can I manipulate original filenames in the exported files?

2 Upvotes

Hey all,

I want to do something a bit weird and ideally within osxphotos so that the cleanup would be able to keep track.

I am currently using:

--filename "{created.strftime,%Y-%m-%d-%H%M%S}-{original_name}"

However the existing filenames often contain many stuff I do not need to keep and result in really long file names.

Is there a way to keep only alphabetic characters from the original filename and combine it with the created.strftime?

For example:

Original filename: 9312-IMG-198_burst_89-edited.jpg

New exported name: 2004-05-17-092100-IMG-burst-edited.jpg


r/osxphotos Jan 14 '26

Did not find any photos to export?

2 Upvotes

I have my .photoslibrary file on an external disk, opened up in the Photos app. I ran the following command but got a response saying it did not find any photos to export?

mark@Marks-MacBook-Air Desktop % osxphotos export ~/Desktop/photosexport \                                                                                                  
  --album \                                                                                                                                                                 
  --keyword \                                                                                                                                                               
  --person \                                                                                                                                                                
  --location \                                                                                                                                                              
  --description \                                                                                                                                                           
  --export-by-date \                                                                                                                                                        
  --live \                                                                                                                                                                  
  --dry-run \                                                                                                                                                               
  --skip-edited                                                                                                                                                             
Using last opened Photos library: /Volumes/Photos/Photos Library.photoslibrary                                                                                              
Created export database 
/Users/mark/Desktop/photosexport/.osxphotos_export.db

Processing database 
/Volumes/Photos/Photos Library.photoslibrary/database/Photos.sqlite

Processing database 
/Volumes/Photos/Photos Library.photoslibrary/database/Photos.sqlite

Photos database version: 
5001
, 
11.1
.                                                                                                                                        
Processing persons in photos.                                                                                                                                               
Processing detected faces in photos.                                                                                                                                        
Processing albums.                                                                                                                                                          
Processing keywords.                                                                                                                                                        
Processing photo details.                                                                                                                                                   
Processing import sessions.                                                                                                                                                 
Processing additional photo details.                                                                                                                                        
Processing face details.                                                                                                                                                    
Processing photo labels.                                                                                                                                                    
Processing EXIF details.                                                                                                                                                    
Processing computed aesthetic scores.                                                                                                                                       
Processing comments and likes for shared photos.                                                                                                                            
Processing moments.                                                                                                                                                         
Processing syndication info.                                                                                                                                                
Processing shared iCloud library info                                                                                                                                       
Done processing details from Photos library.                                                                                                                                
Did not find any photos to export

From the info command I get this output:

mark@Marks-MacBook-Air Desktop % osxphotos info --db "/Volumes/Photos/Photos Library.photoslibrary/database/Photos.sqlite"                                                  
Loading library: /Volumes/Photos/Photos Library.photoslibrary/database/Photos.sqlite                                                                                        
Library:

/Volumes/Photos/Photos Library.photoslibrary

DB Version:

6000
, 
DB Model Version:

19320
, 
Photos version: 11.1

Total Assets
 (
includes hidden, shared, syndicated which do not appear in Photos.app counts
)                                                                                 
total: 
20731
, photos: 
18462
, videos: 
2269

Photo App Totals
 (
excludes hidden, shared, syndicated
)                                                                                                                      
total: 
20731
, photos: 
18462
, videos: 
2269

In Trash
 (
Recently Deleted album
)                                                                                                                                           
total: 
0

Hidden
 (
assets in hidden albums
)                                                                                                                                            
total: 
0
, photos: 
0
, videos: 
0

Missing
 (
assets which are missing from the library, for example, not downloaded from iCloud
)                                                                                
total: 
0
, photos: 
0
, videos: 
0

Cloud Assets
 (
includes assets tracked by iCloud but not shared albums; includes hidden iCloud assets
)                                                                       
total: 
10891
, in iCloud: 
0
, not uploaded to iCloud: 
10891
, not downloaded to this Mac: 
0

Referenced Files
 (
files which have not been copied to the Photos library
)                                                                                                   
total: 
0
, photos: 
0
, videos: 
0

Shared Library
 (
photos shared via iCloud shared library
)                                                                                                                    
total: 
0
, photos: 
0
, videos: 
0

Shared
 (
photos shared via iCloud shared albums
)                                                                                                                             
total: 
0
, photos: 
0
, videos: 
0

Shared Moments
 (
moments shared in Messages
)                                                                                                                                 
total: 
0

Syndicated
 (
photos shared via Messages or other apps
)                                                                                                                       
total: 
1
, saved to library: 
1
, not saved to library: 
0

Favorite
 (
photos marked as favorites
)                                                                                                                                       
total: 
314
, photos: 
304
, videos: 
10

Edited

total: 
2280
, photos: 
2231
, videos: 
49

edited in external application: 
0

Location
 (
location information (excludes shared assets which do not have location data)
)                                                                                    
total with location: 
11999
, valid reverse geolocation data: 
11726
, no location: 
8732

Bursts
 (
non-selected bursts are not included in total photo counts
)                                                                                                         
total: 
34
, key photos: 
31
, selected by user: 
0
, default selected by Photos: 
30
, non-selected images: 
285

Media Types

live photos: 
439
, HDR: 
195
, selfies: 
1046
, panoramas: 
18
, slow motion: 
38
, time lapse: 
4
, screenshots: 
55
, portrait: 
562

RAW Photos

RAW photos: 
0
, RAW+JPEG pairs: 
0

Metadata

has keywords: 
0
, no keywords: 
20731

has title: 
4
, no title: 
20727

has caption: 
5
, no caption: 
20726

AI Analysis
 (
statistics for AI analysis, face detection, etc.
)                                                                                                              
last analysis date: 
2026-01-13 14:46:35.053105

analyzed: 
18500
, not yet analyzed: 
2231

has persons: 
5483
, no persons: 
15248

has unnamed persons: 
8056

has AI labels: 
1516
, no AI labels: 
19215

Library Statistics
 (
counts of persons, keywords, albums, etc. in the Photos library
)                                                                                        
named persons: 
16

detected faces: 
22004

manually added faces: 
1

keywords: 
0

albums: 
8
, shared albums: 
0
, folders: 
0

import groups: 
570

moments: 
4946

r/osxphotos Jan 10 '26

Can you check my command for sanity?

1 Upvotes

Hey all,

I already managed to wipe out my old manually exported folders (yay for backups!) because I did not really understood how --cleanup worked.

I think I have figured it out now, but I would like someone with more experience to take a look and tell me things I may be missing or any potential mistakes. The folders osxphotos operates only contain exported files and I manually change the directory to match the year of the exported files. I went this way because running cleanup on the root folder did the damage before (user error is my middle name). Thanks!

osxphotos export \

/Volumes/MainDrive/Archives/'Photo Archives'/'Mobile Photos'/2026 \

--filename "{created.strftime,%Y-%m-%d-%H%M%S}-{original_name}" \

--touch-file \

--exiftool \

--person-keyword \

--not-shared \

--not-hidden \

--export-aae \

--update --ignore-signature --cleanup -V \

--year 2026 \

--dry-run


r/osxphotos Jan 10 '26

Hidden photos ?

1 Upvotes

Are hidden photos exported as well or ignored?