Prepare a Photos Library Backup Before Running Its Repair Tool
Photos has a library repair tool for a library that will not open or an app that behaves unexpectedly. It works on the library database. Decide what evidence and copies you need before starting, especially if the library contains photographs that exist nowhere else.
Record the library’s location and the behaviour that fails: opening the library, displaying a particular item or completing another specific action. If several libraries exist, identify the affected one so a later successful launch is not simply a different library opening.
Preserve the library before changing it
Apple instructs users to back up the photo library before using Repair Library. Its documented options include Time Machine, another backup solution or copying the library to an external drive. Confirm that the backup actually contains the intended library.
If copying produces storage errors or the drive is unstable, stop and assess that problem before adding a repair operation. A library database tool is not a substitute for a plan to recover unreadable storage. Keep any separate original-photo locations in your data inventory too.
Close Photos. Hold Command and Option while opening it, then choose Repair in the window that appears. An account password may be requested. Apple says the tool analyses the database and repairs detected inconsistencies; a large library can take time.
Check the original problem again
When the process finishes, Photos opens the library. Repeat the particular action that previously failed. Inspect a few known recent and older items, including a video if videos form part of the collection.
For an iCloud Photos library, Apple says iCloud checks the library after repair to ensure correct synchronisation. Allow that follow-up work to finish before judging the final state. Do not delete the preserved backup simply because the main window appears.
If the tool cannot open or the problem remains, retain the exact error and the steps already attempted for support. Successful database repair is useful evidence, but it does not establish that every original file was present beforehand or that every photograph has now been independently verified.
References: Apple: Photos Repair Library.