"Emptying Trash" doesn't remove "unavailable" content

Server Version#: 1.41.6.9685

As the Topic says the server displays content as unavailable, even though automatically “empty trash after each scan” is selected in the settings, and after manually emptying trash via database management, the content still says unavailable.

How do I get empty trash to actually empty the trash? It’s quite annoying having to manually “delete” files that don’t exist.

1 Like

How do I get empty trash to actually empty the trash? It’s quite annoying having to manually “delete” files that don’t exist.

Did you mispeak? You mean delete movies/shows in Plex right? Coz how can you delete files that don’t exist?

You might be confusing Empty Trash with Clean Bundles? What do you mean by “database management”? Where is that? Coz that’s not where you empty trash.

Empty trash automatically happens when the server scans your media folders. If no scan is performed then no empty trash action. If your files are on a samba network, PMS can’t detect changes to those folders automatically. So you have to enable full scan and set a more frequent full scan interval time.

Edit the library in question.
Go to the “Add Folders” tab
You will see at least one, probably more folder paths listed.
Ensure that each of these folders

  • is still existent
  • is not completely empty
  • is accessible (to the server) at the moment when you trigger emptying the trash

Remove all paths that don’t.

No I did not mispeak. I have replaced some files. As an example, I’ve added a different version of a TV episode, the server adds that new file as a different version that can be selected. I then delete the first file for that episode. The server then displays that episode as “UNAVAILABLE” even though the new file is there, and the only way to actually watch the episode is manually selecting the newer version. Manually emptying the trash should get rid of any left over references to files that are no longer on the HDD, however it doesn’t seem to do that, I even tried “Clean Bundles” and nothing. Hence the fact I have to go to each individual episode, go to “get info” and delete the “UNAVAILABLE” file.

I’ve seen this happen but empty trash always fixes this for me. So I’m not sure what’s different in your situation.

btw you can’t delete a file that doesn’t exist. You can remove the record from PMS but since that file doesn’t exist you can’t delete it lol. As you said, you deleted the file already, so how can you delete it again? lol

The folders are all existent, not completely empty, and are all accessible.

Semantics, PMS has “delete” next to the file, so in essence it’s deleting something that’s already been deleted. If you want to get technical about it the file isn’t deleted off the HDD until it’s over written it’s just allocated as free space so technically it does still exist and can be accessed via recovery software unless that space on the HDD has been over written many times. LOL

You mispoke, not sure why you’re so sensitive about it. It’s not like I called you stupid. It makes a big difference if you were referring to deleting a file vs deleting the entry in the PMS database. I just asked for clarification that’s all.

I never misspoke you’re just responding with unhelpful information and remarks.

1 Like

I am seeing the same. Episode was upgraded to a better version, old episode was deleted. Red button is seen “UNAVAILABLE” in series main screen. On the episode in question there is a trash can. Empty trash does not seem to do anything. When trying to choose version to play nothing happens.

Of course, this is only a nuisance because Plex will choose the best version automatically anyway so the old, deleted one is never an option but I don’t want the annoying trash cans all the time and don’t want the rest of the household bothered with this.

If there is only one folder added to the library, and the trash can icons won’t go away unless you manually delete the file record from the database manually, I think it is time to perform a database repair.

For Windows, running the .bat file should be sufficient.
Make sure to close/stop/end Plex server beforehand, using its task tray icon.

1 Like

I did database repair from Plex admin settings (troubleshooting option). Not running Plex from windows but from Synology NAS.

Did not help. I have now manually removed the erroneous records from database by removing the “deleted” version from Plex which obviously fixed it for those I could see. I’ll check again in a couple of days if there are new ones.

I am not aware that this is an option on any platform.

This thread is tagged with server-windows.

Then use the appropriate script for your platform.

Thanx. I got my detective hat on and found that non-windows version of the script. I hadn’t noticed I was in a Windows server thread though, came in from googling the “trash isn’t emptied in Plex”.

After your response, I got back into my non-English version of Plex and saw that it was actually “optimize database”. Duh.

I’ll try the script if the problem is returning.
Thanx!

Small update. It might help others. Apparently pop-up blocker caused trash not emptying. After clicking the button, a verification message should pop up but that didn’t happen on the machine I tried it last. On a different computer it did pop up. And trash was emptied normally. So check your browser settings!

Is there any way to block a complete and total troll like this ChristianKent? Butchfield23 is asking a straightforward question (I’m running into the same problem) and I’m sure the last thing he/she wants is to have to deal with an internet troll just here to harass others. Plex, is there an option on these message boards for us to block users who are more a hinderance than a help? I know Nextdoor allows such an option, I’m guessing other user forum software may allow this option as well?.

You go to the profile and select ignore.

1 Like

Lol :rofl:

I can’t even seem to use the “get info” method, and I’m otherwise having the same problem. Plex was struggling with an episode of a show, deleted episode, found a completely different file with different resolution etc. Plex is still looking for the original file, which I have deleted, and not recognizing the new one. Can’t edit the episode to direct to new file, can’t “delete” file in Plex due to it having been truly deleted from server manually. I also have two movies that won’t go away, though they’re more easily ignored, at least.

I have been having this same problem for a little while now.
I have auto empty trash turned off and just do it manually.

Steps I was doing to get this problem.

I go to Radarr and delete a move and tell it to delete the files also.
The movie then shows as “unavailable” in plex.
Then go to libary and click on empty trash
Get the pop up and confirm ok.
Says trash emptied.

However the movie is still there saying “unavailable”

Server is running Version 1.41.6.9685 on Mac OS.

Thanks to @OttoKerner for the perfect solution.
Ran the Github script and boom, Click on Empty trash and it now all works.

Thanks.