# Fixing (removing/merging) duplicate families

**URL:** <https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131>\
**Category:** Help\
**Created:** [January 14, 2022, 2:54pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131 "2022-01-14T14:54:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaszub](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaszub](https://gramps.discourse.group/u/kaszub)\
**Post date:** [January 14, 2022, 2:54pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/1 "2022-01-14T14:54:08Z")

</div>

I have a tiny little problem with duplicated families in a large database:

 ![obraz](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/0/0f8134fa71a3006b6df9662a342bcfc88b9bb4fc.jpeg)

Is there any way to automatically fix that, by merging/removing the exact duplicates?  
I see tools for duplicate people, media entries etc., but not for families.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 14, 2022, 3:32pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/2 "2022-01-14T15:32:12Z")

</div>

Families merge automatically when the respective anchoring spouses are merged. Likewise, when ALL the anchoring people are removed from a family, the family container goes away.

I’m not sure how your Tree managed to have 5 marriages between the same 2 parents of your Cecylia Konkel. There must be differentiating anchors that are keeping them from being merged.

---

<div class="post-metadata">

**Author:** ![kaszub](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaszub](https://gramps.discourse.group/u/kaszub)\
**Post date:** [January 14, 2022, 3:51pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/3 "2022-01-14T15:51:58Z")

</div>

Here are thew first two families. They only differ in ID.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/5/59151a36a3ff44370be70347a7d4362c158272a7.png)

The families are identical, and are still separate families.

---

<div class="post-metadata">

**Author:** ![kaszub](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaszub](https://gramps.discourse.group/u/kaszub)\
**Post date:** [January 14, 2022, 3:52pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/4 "2022-01-14T15:52:28Z")

</div>

2nd photo, as for some reason I can’t put two in a single post:

 ![obraz](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/0/01a39a3af30a5656bcd0bcf48791d77245a97a02.png)

EDIT:  
Oh wait… Plichta, Jozef is not the same person in these families. Will try to merge.

EDIT2:  
Merged both Jozefs into one, now families are truly identical. Still no decrease in amount of families.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 14, 2022, 4:00pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/5 "2022-01-14T16:00:35Z")

</div>

Once you merge Jozef, to get rid of the unneeded Family record, just remove any person (or event, etc) from the record. The family record will then automatically delete itself as unused.

---

<div class="post-metadata">

**Author:** ![kaszub](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaszub](https://gramps.discourse.group/u/kaszub)\
**Post date:** [January 14, 2022, 4:09pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/6 "2022-01-14T16:09:39Z")

</div>

> [@DaveSch](#):
>
> to get rid of the unneeded Family record, just remove any person (or event, etc) from the record

I tried to remove any of the parents or any of the children, and it had no effect. Did you meant remove **all** persons?

Also, the answer seem to suggest there is currently no automated way to fix this?

Should this be treated as database error (and therefore fixed by currently missing feature of ‘database repair’ option)?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 14, 2022, 4:10pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/7 "2022-01-14T16:10:52Z")

</div>

> [@kaszub](#):
>
> for some reason I can’t put two in a single post:

Your account on the forum is only 4 days old. It has limits to keep robots from doing DoS attacks. The limits will ease in about a month.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 14, 2022, 4:25pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/8 "2022-01-14T16:25:55Z")

</div>

> [@kaszub](#):
>
> Did you meant remove **all** persons?

Yes. So long as any other object (person, event, citation, etc) is attached to the family record, it will not delete. As you already know that the same people are populating both families, it will be safe to delete one of the families.

As to how it occurred… who knows. Gramps will not allow you to create a second family where both parents are the same. But it will accept it from an import. The Check and Repair tool I believe checks for these occurrences but unsure how it corrects them.

If you merge both sets of parents in duplicate families, the families will merge together. If however unique people are set as the parents to two families and no merging of people occurs, the families do not merge. Again, how that occurred… unknown.

---

<div class="post-metadata">

**Author:** ![kaszub](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaszub](https://gramps.discourse.group/u/kaszub)\
**Post date:** [January 14, 2022, 4:38pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/9 "2022-01-14T16:38:48Z")

</div>

> [@DaveSch](#):
>
> how that occurred… unknown.

Both of the ways you’ve speculated about were the reason:

- some duplicates are due to GEDCOM import of a database which was previously exported with filters - these filters removed some people, making some families identical.
- other duplicates are due to merging parents/children - when Gramps sees any differences in families of people being merged, then all the families are added to resulting person. I suspect even different order of families on the list will cause the families merge to fail.

Currently, the Repair Tool cannot fix these.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 14, 2022, 5:19pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/10 "2022-01-14T17:19:51Z")

</div>

I prefer merging duplicate Family objects over clearing them. It is both faster & safer. (And things like Note links and secondary objects won’t be overlooked.)

Use the Families View to select duplicates & use the [Merge](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_3#Merge_Families) toolbar button in that view.

The painful part is navigating the Families View to records to be merged. There isn’t a Families version **[Merge Media](https://www.gramps-project.org/wiki/index.php/Addon:MediaMerge)** add-on or **[Merge Citations](https://www.gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Tools#Merge_citations)** built-in **Tools** under **Family Tree Processing**. Worse, getting the Families view focus to follow the Active Person is arcane.

But the clipboard helps here.

- From the **Relationships** _view_, you can drag any of the Family or Parents rows (by the label or ID) to the clipboard.
- From the **Edit Family** dialog, you can drag the Family to the clipboard from the **Relationship Information** section of the header.
- From the **Edit Person** dialog, you _cannot_ directly drag the family from the Events tab. But you can double-click them there to open the Edit Family dialog and use the steps above.

Once you’ve clipboarded the offending families, you can navigate the Families view using the “Make the Family active” contextual menu selection from the clipboard right-clicking the selected clipboarded object’s pop-up menu.

_(Note that the Clipboard’s context menu is always based on the SELECTED row… it doesn’t matter if you right-click a different unselected row.)_

Remember to change the sorting of the Families view from the ID column to the Father or Mother columns by clicking that column’s header. That way, the 2 record row will be listed adjacently.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 14, 2022, 5:48pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/11 "2022-01-14T17:48:54Z")

</div>

> [@DaveSch](#):
>
> Gramps will not allow you to create a second family where both parents are the same.

Actually it WILL permit this. It just complains before doing so.

I waffle on whether to add a second family for re-marriages. Although it seems the better choice when there was a spouse in-between marriages.

(This reminds of a comedian joke wondering about divorced couples who re-marry. He compared to going the frig, spewing out a mouthful of sour milk you swigged from the carton… then putting the carton back in the frig while saying “maybe it will be better tomorrow”.)

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 14, 2022, 6:07pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/12 "2022-01-14T18:07:57Z")

</div>

> [@emyoulation](#):
>
> It just complains before doing so.

That warning was good enough to stop me from continuing. I stand corrected.

I too have couples that divorced and remarried. One couple doing it 4 times! And yes, I found the divorce records to match.

I’ll need to rethink how I have entered these families.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [February 13, 2022, 6:08pm UTC](https://gramps.discourse.group/t/fixing-removing-merging-duplicate-families/2131/13 "2022-02-13T18:08:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
