Fix macOS "Photos Library" Locked
"Photos cannot find the System Photo Library" or "Library is locked"?
Recommended Troubleshooting Tool
Before proceeding with manual fixes, we recommend using CleanMyMac X. Ideal for scanning disks for errors and clearing hidden system junk.
- [Download CleanMyMac X Free Here](#)
- [Browse 240+ Premium Mac Utilities on Setapp](#)
The Symptom
The Photos app fails to open your library, claiming it's in use by another application or that the library has moved.
The Fix
- Remove the Lock File
Photos creates a hidden .lock file that can persist after a crash. In Terminal:
rm ~/Pictures/Photos\ Library.photoslibrary/lock
- Repair the Library Database
Hold Command + Option while clicking the Photos icon to launch the Repair Tool.
- Reset the Photo Analysis Daemon
killall photoanalysisd mediaanalysisd
Fix 3: The Professional Recovery Path
When manual repair and Terminal commands fail to unlock the library.
If the Photos library is severely corrupted or stuck in a "persistent lock" state, the standard repair tool may not be enough to fix the underlying permission errors.
Recommended Tool: CleanMyMac X
- Maintenance Module: Includes a "Repair Disk Permissions" feature that specifically targets the ~/Pictures folder, ensuring the Photos daemon has the correct access to unlock the database.
- Large & Old Files: Helps you identify and remove corrupted video files that are often the root cause of "locked" or "crashed" libraries.
[Link: Unlock and Repair Photos with CleanMyMac X]
Alternative: PowerPhotos
PowerPhotos allows you to browse your Photos libraries without actually opening the Photos app, making it easier to migrate photos out of a locked library.
[Link: Manage Libraries with PowerPhotos]
Pro Tip
If your library is on an external drive, ensure the drive is formatted as APFS or Mac OS Extended. Photos will not work reliably on ExFAT or NTFS volumes.