I am using Apple's Photos app on macOS El Capitan.

When trying to copy my Photos Library.photoslibrary file (44 gigs) from old external drive to new internal drive, I get a -36 error. Apparently the file is corrupt.

Are all my photos lost? Are those photos stored externally as files somewhere else on the disk?


In Finder, right-click the Photos Library.photoslibrary file and click Show Package Contents. Inside you will find a folder named Masters. It contains all your originals, organized by date. If you’ve made no edits to your photos, then that’s all you need.

If copying Masters fails, you can try copying individual subfolders until you’ve isolated the corrupted folders/photos. This will at least allow you to salvage the vast majority of your photos, instead of losing the entire library.

The -36 error in Finder is often caused by corrupt . files (typically .DS_Store). Thankfully there is a handy command-line utility named dot_clean that will attempt to fix this issue for you. It’s a good idea to have a backup of your photos before using any repair tool, so do this after you’ve copied your Masters folder somewhere safe.

Open a Terminal session and type the following:
dot_clean ~/Pictures/Photos\ Library.photoslibrary/
This is assuming your Photos Library is in the default location. Since you’re using an external drive, replace ~/Pictures with the correct path (prefixing spaces with \).

Now try copying your Photos Library.photoslibrary file once again. If this still fails, try repairing your external drive using Disk Utility and running First Aid on it.

And as a last resort, you can try repairing your Photos Library. Quit out of Photos completely by pressing ⌘ cmd q. Then relaunch the app by holding ⌘ cmd ⌥ opt while clicking the icon in your dock. Finally choose Repair.

Leave the app alone while it does its thing and don't interact with it in any way.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .