Repair Photos app library on Mac

Repair Photos Library on Mac

At first I found the transition from iPhoto to the Photos app on the Mac to be quite bumpy. Many sorting options and my old structure of the photo albums have been lost, but Apple has improved over the years and now “Photos” is the photo manager of choice for me. I especially appreciate the iCloud sync every day when I take photos on the iPhone and can 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 you start 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 surprises me with a much slower "restoring" process ... this took me easily 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 would support.

43 Responses to “Repair Photos App Library on Mac”

  1. 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 :-)

    1. 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.

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

        1. 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.

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

          2. 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!

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

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

  2. 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

    1. Jen Kleinholz

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

  3. 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!

    1. 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.

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

      1. 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.

  4. 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!

  5. Hi,
    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 photo album structure has been lost”. Does that mean the same thing? Is it always like this? I really can't imagine that...

    1. Jen Kleinholz

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

  6. What a mess with Apple's Photos app policy.

    Stumbled upon here after trying to move an Aperture library to Fotos.app.

    Yes, the mighty Aperture has long since been discontinued by Apple, but for a long time I didn't want to "believe" that. There are also ways to run Aperture on new macOS and even Apple silicon with some limitations (see “Retroactive”). But since I also appreciate the advantages of iCloud, i.e. the automatic synchronization between the iDevices, I have been on two tracks for years, Aperture and Fotos.app.

    Now I've managed to convert a (test) Aperture library into a new Fotos.app library with relative ease. This then had to be repaired according to the instructions above.

    However, I gave up trying to import this new library into iCloud Photo Library. All photos are recognized, including duplicates, but the folder/album structure is not imported. WTF! Can't Apple do that or doesn't want to?

    Now I'm looking for an app that intelligently allows me to do this import.

    I am (was) an app developer myself, had even programmed an iOS app “PinApp” to be able to duplicate Aperture photos and projects individually in Fotos.app, but not a whole library with a complete structure.
    Since I reduced programming a lot a few years ago, I shy away from the effort of continuing to program PinApp again.

    Long story short, has anyone found an app that intelligently imports from Photos.app or even Aperture/iPhoto to iCloud Photo Library?

    Otherwise I'll have to do it myself ;-)

    1. Hello Robert! Yes, unfortunately I've read that with the missing folder and album structure more often. I think Apple could do that, but doesn't want to bother with old software.
      I don't know if there is a suitable app for that. I moved in good time and didn't have to worry about solutions - fortunately. But maybe someone knows an app that they can recommend here. Would definitely be helpful for many!

  7. Hi,
    after trying to repair photos, I get the message that the library cannot be repaired.
    What other options do I have?

    Thank you for your ideas.

    1. Hello Harry! If you still have an “old” media library, you may be able to right-click on the media library and then do “Show Package Contents”. With old versions of the media library, there are folders and photos in them. But with the newer format you can unfortunately no longer find any photos. Do you have to see how things are with you? Otherwise I don't have any advice on how to fix it. LG, Jens

  8. Sometimes I no longer understand the Apple world.

    I have a new iPhone 12 Pro and I had no problems with the display of images in FOTO with any previous model. Now only gray areas are shown with a darker cloud instead of the preview. I've tried pretty much everything (even repairing the media library) - nothing helps. Is it possible that my old iMac (27″, late 2013 with High Sierra) is no longer compatible with the iPhone 12? (On my iPad Pro, all the pictures show up normally...and they're all visible in the iCloud as well)
    Maybe someone has an idea……….

    1. Hello Wolfgang! I had to look for this strange symptom myself and was able to come up with the following two solutions that you could try.
      1. Your iPhone may be full and the Photos app cannot save the pictures. Just go to Settings → General → iPhone storage to see if there are still a few GB free.
      2. The good old restart has also helped some people with this problem.

      Try both and get in touch! If it doesn't help, we'll have to investigate further. 😊

      1. Hello Jens, the phenomenon only occurs in the FOTO app on my iMac - not on my iPhone or iPad, which are all connected to iCloud. The iPhone memory is not even half full...
        It only applies to photos that I take with the iPhone - I can see the pictures that are sent to me perfectly on all items. This is totally insane...

          1. The iCloud storage has enough space and so does the internal iMac storage. My old iPhone SE had no problems whatsoever with regard to storage and the PHOTO app on the iMac etc. - it was only from the day I switched to the iPhone 12 that no more images were displayed...as if the iCloud were no longer generating any images for the PHOTO app on the iMac.

    2. Since some iOS versions, the iPhone has been shooting its photos in HEIF format by default. You can also turn this off on the iPhone.
      Is it possible that this format is not recognized under High Sierra? But Apple writes (https://support.apple.com/de-de/HT207022), that this format is supported from High Sierra onwards. Maybe only after an update of your macOS?

      1. Hello Robert, High Sierra actually recognizes the format because all the pictures I took with the iPhone SE before the iPhone 12 are displayed in PHOTOS - also in the iCloud without any problems. Unfortunately, my computer is maxed out with the last version of HS - I'm currently working with version 10.13.2, almost exclusively with InDesign and Photoshop and I've never had any problems with storage capacity (RAM 32 GB) and still have more than 1 TB available . I'm currently loading about 40.000 photos from the iCloud onto my computer - let's see if that does anything...it'll just take forever ;-(

  9. Unfortunately, the upload had no effect. I'm finally at a loss - especially since photos that I receive via WhatsApp are shown in PHOTO. Crazy.

    1. Do you have a working backup of the media library? I would deregister all devices from icloud. Then log out of the account. Restart the computer. Register the account again, then register the HW again on icloud. Check everywhere whether synchronization with the cloud is correctly activated. Then you have to wait depending on the media library size. That can take a long time. Is your media library stored on an external disk? This should only be used for photos for Mac OS X.

  10. Unfortunately no, the SE photos also have the HEIF format of the iCloud. I believe my vintage computer (almost 10 years old, High Sierra) is the trigger. The iPhone 12 is obviously no longer compatible with this operating system. But thanks for the tips!

Post a comment

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

In the Sir Apfelot Blog you will find advice, instructions and reviews on Apple products such as the iPhone, iPad, Apple Watch, AirPods, iMac, Mac Pro, Mac Mini and Mac Studio.