How do I know where is a specific contact stored by Apple Contacts.app?

I am using multiple contact storages, like Gmail or Exchange and I want to know where a contact is stored, so I can remove the right duplicate.

Also I would like to know how can I move a contact from one addressbook to another: from example moving from Exchange to Gmail.

Note: this question applies to OS X 10.9.1


The Contacts database is stored in a single SQLite3 database per source. You can find a list of databases by running the following command:

find ~/Library/Application\ Support/AddressBook/ -name "AddressBook-v22.abcddb"

These databases can be exported using

sqlite3 /path/to/AddressBook-v22.abcddb .dump > ~/Desktop/export

The export can be searched using a text editor or Numbers.

I wouldn't recommend editing the SQLite database directly though.


Use the View menu to toggle the show/hide groups for the contacts app. When groups are visible, you can easily control which group gets an imported contact rather than having to change the default group several times.

To determine which group a specific contact is, search for the contact in question (or a search that shows the contact) and select the first group for each source one by one.

The results in the main window will update and you can isolate which service is feeding which contact entries.

I'm not aware of a good script or one step move, so I drag the contact(s) to the desktop to get a vcard representation of the contact and then delete it from the improper store. Alternatively, you could inspect each group and handle any contacts that you don't want stored with that service.

If I have a few contacts to refile, I make folders on the desktop named for where I want the contacts to be stored and "export by mouse" the contacts that are mis-filed.

The folder makes importing the group much easier. Rather than dragging individual vcard files back into the app, dropping the one folder on the proper group files that group appropriately.