iPhoto 6 and later: Rebuilding the iPhoto library

  • Last Modified: April 03, 2009
  • Article: HT2638

Summary

iPhoto includes a feature that allows you to rebuild the currently selected iPhoto library. Sometimes rebuilding the library may resolve issues such as the library appearing to be unreadable, missing photos, or other issues related to reading the iPhoto library structure.

Note: This article is for iPhoto versions 6 and later. For iPhoto 5 and earlier see article "iPhoto 5 or earlier: Rebuilding the iPhoto library" instead.

Products Affected

iPhoto

Important: You should back up your existing iPhoto Library folder before using the rebuild feature. A backup allows you to restore the iPhoto Library if anything unexpected happens during the rebuild that prevents the library from rebuilding correctly.

Before performing a rebuild, you should install any iPhoto updates by using Software Update. If a software update resolves your issue, then you don't need to rebuild. It's also a good idea to search Apple's Support Page for your specific iPhoto symptom before doing a rebuild, just in case there is a more specific article or relevant solution.

To rebuild the iPhoto library:

  1. Quit iPhoto if it is open.
  2. Hold down the Command and Option keys on the keyboard.
  3. Open iPhoto.
  4. Keep the keys held down until you are prompted to rebuild the library.
  5. A dialog will appear with rebuild options. Select the options you want to use.
  6. Click Rebuild to begin the rebuild process. This may take a few minutes to complete.

Use these guidelines to determine which options to choose in the rebuild dialog:

  • Select the option(s) to rebuild thumbnails only if the thumbnails appear to be an issue (gray, blank, missing or mismatched).
  • Select the option to recover orphaned photos if photos appear to be missing from the iPhoto library. iPhoto will examine the library folder for any photos that are not currently being displayed in Albums or Events in the iPhoto source list.
  • In iPhoto '08 and later, select the option to examine and repair iPhoto Library file permissions if it appears that you cannot edit certain photos or if the iPhoto library will not open. See "iPhoto 6 can't open due to permissions alert" for more information.
  • In iPhoto '08, select the option to "Rebuild the iPhoto Library database" if iPhoto unexpectedly quits when opened or does not get past loading photos.
  • In iPhoto '09, select the option to "rebuild the iPhoto Library Database from automatic backup" if iPhoto unexpectedly quits when opened or does not get past loading photos. This option is similar to the option to "Rebuild the iPhoto Library database" in iPhoto '08, except that it has the added ability to regenerate a database from an automatically backed up library database. Also, after rebuilding your library database using this option, your original database files can be found in the "Before Restore" folder inside the library package.

Note: Any "recovered" photos may not appear in their original album in the source list. However, they should appear in the newly created "Recovered Photos" album in the source list.

Additional Information

Performing a "Manual rebuild"

If the rebuild option in iPhoto does not resolve your issue, you can manually reimport the photos into a new iPhoto library.

  1. While holding down the option key on the keyboard, open iPhoto.
  2. When prompted, select the option to create a new library.
  3. Select a new location for the library, name and save it. Give the new library a different name than the original library to avoid confusion.
  4. From the iPhoto menu, choose Hide iPhoto.
  5. Locate the original iPhoto Library folder in the Finder.
  6. Right-click or control-click the iPhoto library icon and select "Show package contents" from the menu.
  7. In the window that appears, you should see two important folders, "Originals" and "Modified".
  8. Drag the Originals folder onto the iPhoto icon in your Dock.  This imports the original photo files that you imported into the original iPhoto library.
  9. You can also drag the Modified folder onto the iPhoto icon in your Dock. This will copy over all edited versions of images you have previously worked on, including those which have been edited automatically (such as auto-rotated images which have been edited and then imported from your camera).

    Note: Importing both your Modified and Original folders into a new library will result in both the original and edited version of each image, if applicable, showing up in your new iPhoto library.

Tip: Inside the Originals and Modified folders are subfolders organized by date, and then by "film roll" or event. You can drag these folders one at a time to the iPhoto icon in the Dock to import them and retain this organization in your source list.

Note: The manual rebuild procedure does not preserve metadata such as album names, sorting, or comments. It may also introduce duplicates into the iPhoto library. After importing the photos you may want to reorganize and reedit the contents of your new iPhoto library from within the iPhoto application.
 

Not helpful Somewhat helpful Helpful Very helpful Solved my problem