Persistent 'Unavailable' Media Entry Creates False Duplicates After File Replacement

Server Version#: 1.42.2.10122
Hello everyone,

I’m reporting a bug where Plex is not correctly removing the database entry for a media file that has been replaced, leading to persistent “phantom” duplicates.

Summary of the Issue: When a movie file is replaced with a new version (e.g., replacing an MKV with an MP4), Plex correctly identifies the new file but fails to clear the reference to the old, now-deleted file. This old reference remains marked as “Unavailable” indefinitely, even after multiple library scans and emptying the trash. As a result, the movie is permanently and incorrectly listed when filtering the library by “Duplicates”.

Steps to Reproduce:

  1. Add a movie to a Plex library (e.g., movie.mkv). Allow Plex to scan and correctly match it.

  2. Using an external process, replace the original file with a new version. For instance, delete movie.mkv and add movie.mp4 into the same movie folder structure.

  3. Trigger a “Scan Library Files” in Plex.

  4. Plex correctly picks up the new movie.mp4 file. If you check the media info (Get Info), you will see both the new, active file path and the old, “Unavailable” file path.

  5. Trigger an “Empty Trash” for the library.

Expected Behavior: After emptying the trash, the reference to the old, unavailable file should be completely removed from the media’s information. The movie should no longer appear when filtering the library to show Duplicates.

Actual Behavior: The “Unavailable” entry for the old file persists. Emptying the trash has no effect on this phantom entry. The movie is now permanently flagged as a duplicate, even though only one physical file exists.

System Information:

  • Plex Media Server Version: 1.42.2.10122

  • Operating System: Windows 11

  • File System: NTFS

I’ve attached a screenshot showing the media info for an affected item, where you can clearly see the available .mp4 and the unavailable .mkv for the same movie.

Has anyone else experienced this behavior or found a workaround?

Thank you for your help.

That’s definitely odd.

You might give this tool a try: GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases

It can help fix DB errors.

I also tried it, and it didn’t work either. After the whole process, the behavior continues, and the phantom record keeps appearing, and therefore the movie keeps appearing as repeated, even though one of the locations doesn’t exist anymore.

Hmmm… I’d grab server logs at this point. Maybe run a scan and then post the logs? That’ll give reps information they might need to identify where there’s a failure.

Here are the server logs

Plex Media Server.log (4.3 MB)

Which folder has been added to the Plex library (on the “Add Folder” tab)?

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