Server Version: 4.159.0
Server OS: Ubuntu
In the Web UI, I have deselected “Empty trash automatically after every scan.”
I have confirmed that the Preferences.xml file has autoEmptyTrash=“0” set.
I restarted the PMS service.
Test:
mv /path/to/someshow/ /path/to/library/
- Plex automatically scans the library, matches the show, and I can find it in the Library
mv /path/to/library/someshow/ /path/out/of/library
- Plex automatically scans the library, then deletes the show from the library
- “Destroying metadata item 4342 someshow…”
Expected behavior: Since “Empty trash automatically after every scan” is disabled, and Preferences.xml confirms that with autoEmptyTrash=“0”, I expect the show to remain in my library, but say it’s unavailable.
Actual behavior: Plex is deleting the show from my library.
I tested this in multiple libraries, and it appears to only be happening in one (the first TV library I created).
Is my understanding of these settings incorrect, or is this a bug?
I think I figured out why this was happening in one specific Library, but not others: My test file was a (renamed) copy of a different file that already existed in the same Library.
Plex went to do a soft delete, but then discovered the “matching part”, and did a hard delete instead.
Mar 17, 2026 20:04:25.009 [127545902218040] DEBUG - Checking by hash to see if we can find a match with 5aba53487f125d5ccba9d9d4ce4494792c936241 (display offset: 0, not part -1)
Mar 17, 2026 20:04:25.010 [127545902218040] DEBUG - We found a hash match for [/data/plex/tv/Spider-Man The Animated Series/Spider-Man The Animated Series - S01E01.mp4] which was [/data/plex/tv/Reading Rainbow/Season 01/Reading Rainbow - S01E01 - Tight Times (480p WEB-DL).mp4].
Mar 17, 2026 20:04:25.012 [127545902218040] WARN - Duplicate media part detected [/data/plex/tv/Reading Rainbow/Season 01/Reading Rainbow - S01E01 - Tight Times (480p WEB-DL).mp4], but we’ll scan it anyway.
Mar 17, 2026 20:04:25.012 [127545902218040] DEBUG - Hint show didn’t match (‘Spider Man the Animated Series’ != ‘Reading Rainbow’) for DB media item 540
…
Mar 17, 2026 20:05:25.424 [127545938737976] DEBUG - Removing 1 media items that were left.
Mar 17, 2026 20:05:25.424 [127545938737976] DEBUG - Soft-deleting media item 4075.
Mar 17, 2026 20:05:25.425 [127545938737976] DEBUG - Found a matching part for item 4075, performing a hard delete instead.
Mar 17, 2026 20:05:25.425 [127545938737976] DEBUG - Deleting media item 4075.
I attached a copy of the logs for any devs that want to poke.
Plex Media Server Logs_2026-03-17_20-18-40.zip (3.7 MB)
Not necessarily related to your issue, but at least tangential, if you’d like a simple way to create test files in a Linux environment (or macOS or FreeBSD) you can use dd. It’s not quite as quick as renaming an existing file, but it will avoid duplicate hash issues like this.
dd if=/dev/random of=filename.ext bs=1M count=10
This will create a 10 MB file with random data. You could pretty easily script something to create entire seasons (or series).
1 Like