If your Mac Photos app is crashing, showing missing thumbnails, or refusing to open, you can often repair the library file itself using the built-in repair tool. Hold down Option + Command while opening Photos, then click Repair on the damaged library. This guide explains the repair process, what causes library corruption, and what to do when repair doesn’t fix the problem.
What the Photos Library Repair Tool Does
The repair tool is a built-in database utility that scans your Photos library for inconsistencies and rebuilds the index that tracks your photos, albums, and metadata. It does not delete or alter your original image files; it only fixes the database structure that Photos uses to display them. The tool checks for things like missing thumbnail references, broken album links, and corrupted metadata entries.
You can also use the tool to rebuild the library, which is a more thorough process that regenerates all thumbnails and re-imports metadata from your original files. Rebuilding takes much longer but can resolve issues that a simple repair misses. Both options are available from the same screen when you first open Photos with the keyboard shortcut.
How to Run the Repair Tool
- Quit Photos completely (press Command + Q).
- Hold down Option + Command on your keyboard.
- Double-click the Photos app icon in your Applications folder or Dock.
- Keep holding the keys until you see a window asking you to choose a library.
- Select the library you want to repair (usually the one named “Photos Library�).
- Click Repair and wait for the process to finish. It can take several minutes to an hour depending on library size.
If repair doesn’t work, repeat the steps but choose Rebuild instead. Rebuilding will take longer but is more thorough. After either process, Photos will open normally. If you have multiple libraries, be sure to select the correct one.
Common Causes of Library Corruption
Photos library corruption usually happens after an unexpected shutdown, a power outage, or a crash while Photos is writing data. Other culprits include:
- Storing your library on an external drive that was disconnected without ejecting.
- Running out of disk space while Photos is saving changes.
- Using third-party software that modifies the library file directly.
- Syncing issues with iCloud Photos that interrupt the database.
In most cases, the repair tool can fix these problems. However, if the library file itself is physically damaged (for example, from a failing hard drive), repair may not be enough.
What to Do If Repair Doesn’t Work
If the repair tool fails or Photos still won’t open, try these steps in order:
- Restart your Mac – Sometimes a simple reboot clears temporary file locks.
- Check disk space – Ensure you have at least 10–15% free space on the drive where the library is stored.
- Try a different library – Open Photos while holding Option to see if another library opens fine. If yes, your main library is likely corrupted.
- Copy the library to another drive – Use Finder to copy the entire .photoslibrary bundle to an internal drive (if it’s on external) and try repairing the copy.
- Use Time Machine – If you have a backup from before the corruption, restore just the Photos library from that backup.
If none of these work, your library may be beyond repair. You can still recover your original photos by right-clicking the library file and choosing Show Package Contents, then navigating to the originals folder. Your photos are stored there as files, even if the database is broken.
Preventing Future Library Corruption
Once your library is fixed, take these steps to reduce the chance of it happening again:
- Always eject external drives properly before disconnecting.
- Keep your Mac plugged in during large imports or edits.
- Ensure your startup disk has adequate free space (at least 20 GB for a large library).
- Enable Time Machine backups so you can restore a clean copy if needed.
- Periodically run the repair tool proactively if you notice odd behavior like slow loading or missing thumbnails.
Also, consider using iCloud Photos if you aren’t already. It keeps a copy of your library in the cloud, so even if your local file is damaged, you can re-download everything after creating a new library.
Alternative: Create a New Library and Import
If repair and rebuild both fail, your last resort is to create a fresh library and manually import your photos. This works because your original image files are usually still intact inside the library bundle.
- Quit Photos and hold Option while opening it.
- Click Create New Library and give it a name.
- In the new library, go to File > Import.
- Navigate to the old library file, right-click it, and choose Show Package Contents.
- Go to the originals folder and select all subfolders (they’re organized by date).
- Click Import and wait for the process to finish.
This method recovers your original photos but loses albums, faces, and edit history. It’s a last resort, but it’s better than losing everything.
Frequently Asked Questions
Will repairing my Photos library delete any photos?
No. The repair tool only fixes the database; it never deletes your original image files. Your photos, videos, and edits remain intact. Rebuilding also preserves originals, though it may take a long time to regenerate thumbnails.
How long does the repair take?
It depends on the size of your library. A small library (a few thousand photos) may take 10–20 minutes. A library with 50,000+ items could take over an hour. Rebuilding takes roughly twice as long as a simple repair.
Can I use Photos while the repair is running?
No. The repair tool locks the library and you cannot use Photos until it finishes. You can use other apps, but avoid putting your Mac to sleep or closing the lid, as that can interrupt the process.
What if my library is on an external drive?
Repair works the same way, but make sure the drive is connected via a stable connection (preferably USB-C or Thunderbolt) and has enough free space. If the drive is slow, the repair may take longer. Also, ensure the drive is not going to sleep during the process.
Does iCloud Photos affect the repair?
If you have iCloud Photos enabled, the repair tool works on your local database. After repair, Photos will re-sync with iCloud. If iCloud itself is the source of corruption, you may need to turn off iCloud Photos temporarily, repair, then turn it back on.
Can I repair a Photos library from an older Mac?
Yes, as long as the library format is compatible with your current macOS version. If you’re upgrading from an older macOS, Photos will automatically convert the library on first open. If that conversion fails, you can still use the repair tool on the pre-converted library.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Secure Boot Battlefield 6 ASUS: Fix & Enable Guide
- Best Tech Websites to Follow for Pros & Beginners
- Second Wind Quest Walkthrough: Where Winds Meet6.00 min/km
- Enshrouded Weapon Upgrade Guide: How to Improve Gear5.00 min/km
- Connect Phone to Controller for Cloud Gaming
- Python Search Highlighting: Snippets & Matches