Skip to content

Merging duplicate players

jozef2svrcek edited this page Jun 21, 2026 · 2 revisions

Merging duplicate players

After importing PGN files you may find the same player listed twice — for example a full name "Krejcar, Walter" and a surname-only "Krejcar", each with their own games. This happens when different PGN sources spell the same player differently (full name vs surname only, "Lastname, Firstname" vs "Firstname Lastname", accents or spelling differences, …).

LPDO's automatic deduplication only merges records that share the same FIDE ID, so it can't combine these on its own — the surname-only record usually has no FIDE ID. For those, you merge the records yourself. The easiest way is now right inside the app.

In the app (recommended)

Available from v0.4.0.

You can start a merge from three places — all of them open the same Merge players dialog:

  • From a player's profile — open the player, then click Merge… in the header (next to Print/PDF).
  • From the players list — click one player, then Ctrl-click (⌘-click on macOS) a second player so two are selected. A Merge these 2 players… button appears above the game list. (Select exactly two — with three or more, the app reminds you that merge works with two.)
  • From Maintenance — go to Maintenance → Players → Merge players and click Merge players….

In the dialog:

  1. Choose which record to keep (usually the full, FIDE-linked name) and which to drop. Use the swap control if you picked them the wrong way round.
  2. Check the preview of the two records and their game counts.
  3. Confirm. All of the dropped player's games move onto the kept player, and the dropped record is deleted.

Merging is permanent — the dropped record is gone and its games now belong to the player you kept (whose name is the one that remains).

From the command line

The bundled chess-db command line can do the same thing — handy for batch work, scripting, or if you simply prefer the terminal.

Close the LPDO app first so it isn't holding the database open, then run the commands below. While the app is open it holds the database and the command can't acquire it.

Merge by name (easiest)

Keep the better record (usually the full, FIDE-linked name) and merge the other into it:

chess-db players merge-by-name "Krejcar, Walter" "Krejcar"
  • The first name is kept; the second is deleted and all of its games move onto the first.
  • Type the names exactly as they appear in the app.
  • You'll be asked to confirm — add --yes to skip the prompt.

Merge by ID

If the names are similar enough that merge-by-name is ambiguous, merge by ID. First find the IDs:

chess-db search players "Krejcar"

then merge (keep first, drop second):

chess-db players merge <keep-id> <drop-id>

Automatic: merge records that share a FIDE ID

If the duplicates carry the same FIDE ID (often the case when the same player was imported from different files), merge all such pairs in one go:

chess-db players dedup

Notes

  • The database is at ~/.chess-db/chess.db by default — no path needed.
  • The in-app merge works while the app is running; the command-line merges need the app closed (see the note above).
  • Merging is permanent: the dropped record is deleted and its games are reassigned to the kept player, whose name is the one that remains.

Clone this wiki locally