Plex DB Repair Script Fails – UNIQUE Constraint Error

Server Version#:4.152.0
Player Version#:
My Plex database is corrupted. I’ve attempted to repair it using DBrepair.sh, but neither the automatic nor manual options work. The error I receive is:

Exporting current databases using timestamp: 2025-09-26_15.47.34
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 187972: UNIQUE constraint failed: directories.id (19)
Error 1 from Plex SQLite while importing from ‘./dbtmp/library.plexapp.sql-2025-09-26_15.47.34’
Cannot continue.

Any help would be greatly appreciated.

This should be a discussion on Github.

DBRepair issues are not a topic for Plex Media Server / Server Linux
(Other than the occasional 3rd party discussion thread)

That said,

In the README.md file, There are instructions to use the IGNORE command when dealing with this type of database damage.

Please see the README.md for further instructions.