Plex empty trash command broken for months

Server Version: 1.25.9.5673:
Player Version: 1.43.4.2971-aa2133cc:

For a few months now, my server does not remove missing files anymore. It leeps saying that deleted files are missing, which is correct, but then the clear trash command does not remove them. So it continues to show an error message and it takes a while to play items as it rotates through items that don’t exist anymore!

Check your system for database corruption.

Pull the server log files (Settings → Troubleshooting).

Upzip the file and look in Plex Media Server.log (or .1.log…5.log).

Search for SQLITE3 errors that mention database corruption or a malformed database.
ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]

If the database is corrupted, you’ve three choices:

  1. attempt repair
  2. restore from backup
  3. delete and start over

To repair, see Repair a Corrupted Database.

To restore, see Restore a Database Backed Up via ‘Scheduled Tasks’.

Note: It is possible the backup is also corrupted. Check the server logs for corruption after loading the backup database.

If neither repair or restore work, you can delete the database. You will have to re-create your libraries. Your media files are not affected. This is mentioned in the Repair support article.

I’ve seen this behavior before with two people. Coincidentally their files were hosted on Google drive. Is that your case too? (Not say that’s the problem)

I tried that before but it reported that the database was OK.

No corruption reported.

Yes that’s correct. Interesting.

It used to work so it don’t get why it wouldn’t be working now. And these files are really gone as Plex says as well. It shouldn’t know if the files are on a cloud drive or not.

Exactly! I just mentioned it because they were complaining about the same thing and that’s what they have in common. So everytime they have to scan their library twice and then Empty Trash.
Couldn’t it be because of rclone cache?

Well Plex reports that those files are missing, so it clearly knows what references to delete. It just doesn’t.

It’s more efficient to use autoscan for that, as that tracks changes instead of needing to check your entire library.

Are the files missing some media that you replaced with another version?

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