# Plex ignoring autoEmptyTrash="0"

**URL:** <https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208>\
**Category:** Plex Media Server\
**Tags:** server-linux, library-management\
**Created:** [March 17, 2026, 11:24pm UTC](https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208 "2026-03-17T23:24:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![inkalchemist](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/inkalchemist/32/122194_2.png) [@inkalchemist](https://forums.plex.tv/u/inkalchemist)\
**Post date:** [March 17, 2026, 11:24pm UTC](https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208/1 "2026-03-17T23:24:16Z")

</div>

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:

1. `mv /path/to/someshow/ /path/to/library/`
2. Plex automatically scans the library, matches the show, and I can find it in the Library
3. `mv /path/to/library/someshow/ /path/out/of/library`
4. Plex automatically scans the library, then deletes the show from the library
  1. “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?

---

<div class="post-metadata">

**Author:** ![inkalchemist](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/inkalchemist/32/122194_2.png) [@inkalchemist](https://forums.plex.tv/u/inkalchemist)\
**Post date:** [March 18, 2026, 12:24am UTC](https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208/2 "2026-03-18T00:24:11Z")

</div>

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](https://forums.plex.tv/uploads/short-url/7dFKjZe6oaPwo9tppJspPIKLIKU.zip) (3.7 MB)

---

<div class="post-metadata">

**Author:** ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)\
**Post date:** [March 18, 2026, 12:40am UTC](https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208/3 "2026-03-18T00:40:40Z")

</div>

> [@inkalchemist](#):
>
> My test file was a (renamed) copy of a different file that already existed in the same Library.

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).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 16, 2026, 12:41am UTC](https://forums.plex.tv/t/plex-ignoring-autoemptytrash-0/937208/4 "2026-06-16T00:41:31Z")

</div>

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