You can try this:
Using iPhoto Library Manager to Rebuild Your iPhoto Library
- Download iPhoto Library Manager and launch.
- Click on the Add Library button,
navigate to your Home/Pictures folder and select your iPhoto Library folder.
- Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option
- In the next window name the new library and select the location you want it to be placed.
- Click on the Create button.
Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments. However, books, calendars, cards and slideshows will be lost.
Note: your current library will be left untouched for further attempts at a fix if so desired.
I had exactly the same problem.
It started in Sommer 2012, and I had about 40 "ghost" events.
I could see these ghost events in
- Aperture (using the same library as in iPhoto)
I could not see them in
What I detected:
With the help of Aperture and iPhoto2Disk I discovered, that the ghost events had some photos inside, but no application showed them. All photos which belongs to the ghost events, were photos, I have already deleted - but I have seen this already - iPhoto did not delete them in the Library (directory masters). And some day - these photos come up again.
What I have done:
In Aperture, I saw the ghost events, but with no photos inside. But - when I delete the ghost events - I see the events and the photos in the trash. After making the trash empty, the photos, the ghost events and also the files in the master directory of the library was gone.
I also do no longer see the ghost events in iTunes, iPhoto2Disc,....
So, Aperture repaired my library. It is sad, that iPhoto cannot do this.
Thanks for the note about how Aperture can fix the issue.
I don't have Aperture so I'm going to tolerate the bug for now. Final Cut Pro does not see the ghost iPhoto events. GraphicConverter 8 sees the ghost events and also the ghost images inside the events.
I experimented a little on my Carbon Copy Cloned test partition:
I used a text editor (TextWrangler) to edit off the ghost event entries in the iPhoto library AlbumData.xml file (all text between <dict> and </dict>). After that iTunes no longer listed them. But that was only a cosmetic fix: after letting iPhoto rebuild the libarary database (via Command-Option launch), the ghost events re-appeared (because the bogus folders and images were still in the library).
I also tried iPhoto Library Manager. It started to fix and duplicate the iPhoto library, but I have 15 000 images and video files in the library so I gave up after 1.5 hours and about 50% done (on a Mac mini).
Today I imported images from my wife's and daughter's iPhones to iPhoto and got two more ghost events in the process.
I hope iPhoto is fixed to handle this better.
OK, if you don't have aperture, my hint was useless. What I wanted to say in general - iPhoto has a big problem with deleting photos. I have seen this in different variants. Pictures you delete (include cleaning the trash) will stay (sometimes) in the library and they will come back in different ways.
I think iPhoto 11 still has a big problem with dealing with the library. It seems, that aperture is making this job better. I hope someday's Apple will make a more stable version of iPhoto, like it was in the former versions. This Version is a mess, since they the start (I think that was 2011).
Just to underline, what I'm meaning - let the Finder count the picture file in the masters folder of the library. This should be the same, as the number of photos in iPhoto. In my case, this not the same :-(