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.



Effectively for free: iPhone 13 Mini and iPhone 13 deals with top conditions at Otelo - Advertisement


  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 Apfelot 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 Apfelot 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 Apfelot 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 Apfelot 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 Apfelot 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 Apfelot 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

    • Jens 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 ...

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * .