I got "Photos was unable to open the library 'Photos Library.photoslibrary'. (-1)" error while repairing my photo library

My photo library stuck on syncing with iCloud two days ago. I turned off sync, deleted all my photos and tried to download again to see if it works. But it stuck on "syncing with iCloud" for more than 24 hours.

Then I tried to repair it but got below errors:

And creating a new library won't help

MacBook Pro 14″, macOS 14.0

Posted on Oct 26, 2023 9:40 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 27, 2023 11:06 AM

Hello XXXYYYY290,


You can use the steps below to reinstate the backup of your library that was made before starting the repair process:


1. If the Photos app  on your Mac is open, choose Photos > Quit Photos.
2. Click the Time Machine icon in the menu bar and choose Enter Time Machine, or choose Apple menu  > System Settings, click General in the sidebar, then click Time Machine  on the right. (You may need to scroll down.)
3. Time Machine opens and shows your available backups.
4. Click the date of your last backup, navigate to the backup of your photo library, then click to select it.
5. Click Restore.
6. Depending on the size of your library, it may take some time for your library to be restored. When you next open Photos, you should be able to use your Photos library as it was when last backed up.


You can also find those steps in the resources below:


Restore a library from Time Machine in Photos on Mac - Apple Support


Repair your library in Photos on Mac - Apple Support


Should you still be unable to open your photos library, or sync with iCloud, you'll want to reach out to Apple Support: Apple Support They'll be in the best position to look into this further.


Take care.

3 replies
Question marked as Top-ranking reply

Oct 27, 2023 11:06 AM in response to XXXYYYY290

Hello XXXYYYY290,


You can use the steps below to reinstate the backup of your library that was made before starting the repair process:


1. If the Photos app  on your Mac is open, choose Photos > Quit Photos.
2. Click the Time Machine icon in the menu bar and choose Enter Time Machine, or choose Apple menu  > System Settings, click General in the sidebar, then click Time Machine  on the right. (You may need to scroll down.)
3. Time Machine opens and shows your available backups.
4. Click the date of your last backup, navigate to the backup of your photo library, then click to select it.
5. Click Restore.
6. Depending on the size of your library, it may take some time for your library to be restored. When you next open Photos, you should be able to use your Photos library as it was when last backed up.


You can also find those steps in the resources below:


Restore a library from Time Machine in Photos on Mac - Apple Support


Repair your library in Photos on Mac - Apple Support


Should you still be unable to open your photos library, or sync with iCloud, you'll want to reach out to Apple Support: Apple Support They'll be in the best position to look into this further.


Take care.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I got "Photos was unable to open the library 'Photos Library.photoslibrary'. (-1)" error while repairing my photo library

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.