to provide an answer to this old question, as it's still good info to have...
1) The best way at the time to delete the photos would have been to view the Last Imported photos and delete them from there. Not just deleting the duplicates, but deleting all of the photos (basically to reverse the import that was done).
2) What should have been done to import the photos from your wife's phone in to your library is to connect her phone to your computer, and import them from the phone itself, rather than the stream. This way, you are getting the original photos, not the compressed / lower quality versions from the photo stream.
I created a fresh new iPhoto library, populated it with some photos, and migrated that library to Photos, but I could not reproduce this problem. So it looks like another problem with my original iPhoto library. Great.
So I decided to look directly in the Photos library database to see what was going on. The Photos library database can be found in ~/Pictures/Photos Library.photoslibrary/Database/Library.apdb
; this is an SQLite database that can be opened using the command-line sqlite3
tool, or any GUI you prefer.
If you're about to follow the steps in my answer past this point, remember to back up the library file before proceeding.
The schema for RKAlbum
contains a folderUuid
column that associates an album with a folder (in RKFolder
). In the Photos library that was migrated from the fresh iPhoto library, the Last Import album looks like this:
sqlite> SELECT name, folderUuid FROM RKAlbum WHERE name = 'Last Import';
Last Import|LibraryFolder
But in the Photos library that was created from my original iPhoto library, the album looks like this:
sqlite> SELECT name, folderUuid FROM RKAlbum WHERE name = 'Last Import';
Last Import|cQeJj7YPRmSxHysWN+ql4w
Notice that folderUuid
here is a generated string and not 'LibraryFolder'
. Obviously, this is an arbitrary folder — specifically the iPhoto Events folder that is created as part of the migration process. And sure enough:
sqlite> SELECT uuid, name FROM RKFolder WHERE uuid = 'cQeJj7YPRmSxHysWN+ql4w';
cQeJj7YPRmSxHysWN+ql4w|iPhoto Events
As an immediate workaround, changing the column directly seems to work:
sqlite> UPDATE RKAlbum SET folderUuid = 'LibraryFolder' WHERE name = 'Last Import';
Now opening Photos and deleting the iPhoto Events folder leaves Last Import intact. Importing new photos doesn't cause any further problems; the Last Import folder behaves as it always did, and should.
Out of curiosity I decided to find out what was causing Photos to place Last Import in the iPhoto Events folder in the first place.
Turns out, in my original iPhoto library, the folderUuid
of Last Import was not 'LibraryFolder'
, but 'AllProjectsItem'
— the same as the original Events category:
sqlite> SELECT name, folderUuid FROM RKAlbum WHERE name = 'Last Import';
Last Import|AllProjectsItem
sqlite> SELECT name, folderUuid FROM RKAlbum WHERE folderUuid = 'AllProjectsItem';
Events|AllProjectsItem
Last Import|AllProjectsItem
This is not the case in the fresh iPhoto library:
sqlite> SELECT name, folderUuid FROM RKAlbum WHERE name = 'Last Import';
Last Import|LibraryFolder
Fixing the incorrect column in the original iPhoto library database (with the same UPDATE
statement as above) seems to fix the Last Import folder when migrating to Photos as well. I think I'll go with this instead since it corrects both the old and new libraries.
Like in my previous question, I don't understand why or how my original iPhoto library reached that state in the first place, or why repairing/rebuilding the library didn't help at all. Was I bitten by a rare bug in iPhoto? Was I using iPhoto incorrectly? Either way, I'm lucky that I know a thing or two about SQLite and was therefore able to fix this on my own — if in the unlikely event someone has run into this very same issue, I hope this post will be helpful to them.
Once again, be sure to back up the entire library first.
Best Answer
I'd say stick to the iPhoto Library if that's the app you're going to continue using for now.
When you eventually swap to Photos, do the import again.
The Photos Library is greyed out if you attempt to open it from iPhoto. Any changes you make to the iPhoto Library will not be reflected in the Photos Library, meaning you'll gradually go out of sync until such time as iPhoto no longer works (OS X 10.11, who knows?) & you'll need to reimport at that time.
Photos Library Storage Space
The Photos Library is actually just a collection of hard links to the actual data on the disk & therefore is not taking up anything like the amount of space that Finder is reporting.
More on hard links from Ars Technica:
This means that so long as one of the pointers to the data still exists, the data is still in use. Only by deleting both will the data actually be deleted.
Ref: Apple KB - Photos saves disk space by sharing images with your iPhoto or Aperture libraries