Repair Photos app library on Mac

Repair Photos Library on Mac

At first I found the switch from iPhoto to the Photos app on the Mac to be relatively bumpy. Many sorting options and my old structure of the photo albums have been lost, but meanwhile Apple has improved over the years and meanwhile "Photos" is the photo management of my choice. I especially appreciate the iCloud sync every day when I take photos on the iPhone and then edit them directly on the Mac.

The photos app's media library can be repaired with a key combination at startup (Photos: Sir Apfelot).

The photos app's media library can be repaired with a key combination at startup (Photos: Sir Apfelot).

Error message: Photo library no longer available

My photo library is on an external hard drive so that I can protect the internal SSD of my MacBook Pro a little. But sometimes it happens that the hard drive is disconnected from the hub while the Photos app is open on the Mac. In this case - and of course if the media library is actually damaged - you will get the following error message:

Photos needs to close because the photo library is no longer available or data has been corrupted.

The first few times I always got a real shock and thought that all of my photos had become illegible. In fact, there is usually no serious problem with the database of photos, you can either select the photo library again or you actually have to repair it.

When starting the Photos app, hold down CMD and ALT and then click on the "Repair" button.

When starting the Photos app, hold down CMD and ALT and then click on the "Repair" button.

Repair the photo library with the keyboard shortcut CMD + ALT

Repairing the photos library is relatively easy, but depending on the size of the library, you should bring some time with you. While the Mac is doing the repair, you can't do anything in the Photos app, you have to wait until the thing is done.

The actual repair is started with a keyboard shortcut:

  1. Close the Photos app
  2. Hold down the CMD + ALT keys and start photos
  3. then comes the question of whether you want to repair the photo library, which you answer with "repair"
  4. Now the Mac still wants the admin password and then starts work

How long does it take to repair the media library?

I just started it for a test to see how long the action lasts. I have a library with about 220 GB. The first progress bar was still running fairly quickly for me. The message "Repair media library ..." appeared and this process was finished after about 15 to 20 minutes.

After that, however, the next progress bar begins with the message "Restore ..." and it only reached 30% for me even after 20 minutes of running time. So you can imagine that it is smart to let this action run overnight if you have the choice.

After the repair, a photo still surprises with a significantly slower process of "restoring" ... this took me 3 to 4 hours.

After the repair, the Photos app surprised me with a much slower "restore" process ... it took me 3 to 4 hours.

Can the photos be damaged during the repair?

This question can be clearly answered in the negative, because the Mac does not change the image files, only the database that stores all the information about the photos. The photos will remain in their previously saved form.

Create a backup of the photo library

If you are afraid of damaging something, you can (and this is always a good idea!) Create a Time Machine backup so that all photos and the database are automatically backed up.

Alternatively, you can drag and drop the photo library file into another folder while holding down the ALT key, so that you have a backup of the latest status. The media library can usually be found in the user folder and there in "Pictures".

The photos app's media library can also be opened without the app. But then you have to deal with cryptic folders and file names.

The photos app's media library can also be opened without the app. But then you have to deal with cryptic folders and file names.

For me it is called "Photos Library.photoslibrary" and ends with the file extension ".photoslibrary". If you want to take a look at the database, click the library with the right mouse button and then select "Show package contents". Now the folder structure of the library opens, whereby you can find all the original photos under the folder “originals”. Unfortunately, everything is named and sorted somewhat encrypted, so that you can't really do much with it.

I hope you can get back to your photos and repair the media library. If you have any further tips, I look forward to your comments.


Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership or at Patreon would support.


  1. Nicolas says:

    Thanks for the tip!
    I have the monkey theater every now and then ...
    However, the photos library runs on a Transcent 256GB SD card in the SD slot of my MBP.

    So far everything has run smoothly and quickly. But for a few weeks now I've often had the beach ball for the smallest actions in photos.

    Exporting from photos takes forever and everything is in slow motion!

    Should I perform a repair as described above, or is the behavior due to something else?

    Thank you :-)

    • sir appleot says:

      Hello Nicolas! I would give myself little hope there. For me, the photos app takes a good 20-30 seconds to start ... well, it's not an SSD, but still. I once did the repair because I thought it would be faster then, but puff pie. Everything is still lame. I'm afraid Apple will have to spend a few developer hours on the Photos app to make the software usable again.

      • Nicolas says:

        I was afraid ...
        Thanks anyway for your fast reply.
        If the media library runs directly on the internal SSD, everything is quite smooth ... ???????? ‍♂️

        • sir appleot says:

          Ah ok. Maybe I should clear some space again and move it back to the internal SSD. : D

        • Billy Bob says:

          Mmmhh! For me, the Photo Library runs on a 2 TB external SSD of the SanDisk type. This is connected via USB C. Everything is absolutely fluid and without a break. Exporting is also quick. No spinning ball of death.

          • sir appleot says:

            I still have an external rotating hard drive on which the photo library runs. Maybe this is the problem?!? : D

          • Nicolas says:

            Yes, it is probably also due to the rather leisurely Transcend 256 in the SD slot….

            I think I'll outsource the Janze to an external SSD!

          • sir appleot says:

            Ick! : D Have to see which 2 TB SSD you can afford.

  2. Billy Bob says:

    The appropriate external housing is also important. So that the speed is passed through.

    • sir appleot says:

      Hello billy! If you have any recommendations, please let us know. Then I would like to look at them and buy them if necessary.

    • sir appleot says:

      Great thanks to you! I will click soon. I once linked your recommendation so that you can find the right model faster.

  3. Fritzi says:

    Hi, the repair does not work for me. Despite starting Foto with cmd + alt, the same error message appears. I am not offered the repair option. What am I doing wrong?

    Greetings, Fritzi

    • Jen Kleinholz says:

      Hello Fritzi! Which system do you have Maybe an older one? Or are you pressing the wrong buttons? Actually, there should be no differences when it comes to repairs ...

  4. Kurt Wenger says:

    My photo library is on an external disk. After an unsuccessful update to Monterey, I repented and ended up back at Big Sur with enormous effort.
    Since then I can no longer use the (updated?) photo library; Repair attempts failed ('Unsupported library... / newer version... / please update...').
    I still have a usable photo library, but it's about 3/4 years old. How do I get the missing images back? TimeMachine: None...
    Thanks for every offer of help!

    • Jen Kleinholz says:

      Hello Kurt! I think with the upgrade to Monterey, the Mac has converted the Photo Library layout. If you install a Monterey on an external disk, you should be able to open the photo library again. But you probably won't be able to re-knit them into a "Big Sur" library.

    • Volley Hartwig says:

      Have you backed up your photos to iCloud? Then it shouldn't really be a problem to get the photos back from the cloud.

      • Kurt Wenger says:

        Thanks for your comment!
        iCloud for 70 GB+ is pretty expensive; So answer: no, no iCloud backup.
        My bad luck…
        I'll stick with it, see above.

  5. Kurt Wenger says:

    Solved as follows:
    – Installed bootable on an external HDD Monterey.
    – Booted 10.12, integrated the 'shot' photoslibrary as system media library.
    – All photos that could no longer be found on Monterey since the failed update were exported as originals.
    – Imported these exported photos back into Big Sur in my iMac.
    Everything seems to be in order.
    Thanks to all advisors!

  6. MrTom says:

    I'm just moving from my old Macbook Pro (2012, macOS Mojave (because of older programs)) to my new Macbook Pro (202, current).
    It all worked more or less (apart from the fact that tried and tested operations are no longer possible...).

    But then the frightening thing:
    All carefully maintained 43000 photos have lost their title, description and categories and faces!!!
    I'm working with it, how am I supposed to find photos now?
    Do I have to retouch every 43000 photos? Apart from the fact that of course I don't even remember which event it was (I'm an artist). That's why I named the photos like that...

    Now I read here "my old structure of the photo albums has been lost". Does that mean the same thing? Is it always like this? I really can't imagine that...

    • Jen Kleinholz says:

      Hello MrTom! I'm afraid so... you must have edited and sorted your photos in iPhoto. At some point, however, Apple discontinued iPhoto and switched to Apple Photos. Unfortunately, a lot of data is lost during this change... probably your title, description, etc. And as far as I know, there is no right solution for. I hope you still have your old MacBook Pro with the old structure. If so, one could look for a program that might take over this data and structure. The Photos app isn't...

Leave a Comment

Your e-mail address will not be published.