I ran this script, it reported “Database repair/rebuild/reindex completed” however after i restarted my server and emptied the trash again, the files still show as unavailable. No “trash can” icon on the series, but the individual episode’s media info still reflect the unavailabe files. Any idea?
Inspect the plex media info of those episodes.
Right at the top, you should see one – or in this situation more likely more than one – file paths. Find out where each of those paths is pointing to.
Are all those paths valid?
Yes, looking in the media info i see one of the filepaths pointing to a file that has been deleted. I think the issue arises from the current file residing in the same folder the deleted file was in? I can clear the “unavailable” file path using delete within media info, but doing this individually is very time consuming so I was hoping the db fix you mentioned might do the heavy lifting for me.
“Scan Library Files”, followed by “Empty Trash” is supposed to get rid of these.
If that doesn’t work, it is either caused by a defective database file, or one of the above mentioned things: "Emptying Trash" doesn't remove "unavailable" content - #3 by OttoKerner
I’m having the same issue for several TV Shows and this issue is relatively new, for at least a month (approximate). I’ve deleted the entire show folder (using file explorer not plex) for the ones I’ve identified. Example Below:
The unavailable show file is in a show folder that has been completely removed see folder explorer screenshot showing that show folder doesn’t exist any longer.
Its a windows 11 OS running version 1.41.9.9961 (although this issue has carried over for at least 2 updates).
I’ve attempted the dbrepair bat file 3 separate times (as I identify others with the issue) but it doesn’t seem to fix this issue.
Just for note, I run empty trash, clean bundles, and optimize database on the regular (3 or more time a week, depending on the # on how often I add content).
I have a parallel server I run on a separate machine and it has the exact same issue on the same shows (Running Version 1.42.0.9975). I have NOT run any db cleanup on that server (other than my normal empty trash, clean bundles, and optimize db) i run on the regular just like previous system.
I’ve been running 1 of these servers for probably a decade, and the other for over 5 years.
This has never been a problem I’ve experienced historically (IE emptying trash always worked after a fresh scan libraries found unavailable items.).
For note, just to be clear, The parent folders still exist (IE Library/TV) for the respective locations, but the show folders no longer exist.
Note: I typically do not allow deletion from Plex, but turning this on, and deleting the files (clicking trashcan next to unavailable items) does work (as ThatBOSSChris stated), but I believe this might be an issue introduced around Server Version#: 1.41.6.9685, as the original post identified as their version.
You have an additional “sf” folder. I wonder if that is causing this issue.
When you edit your tv shows library, and go to the “Add Folders” tab, how many folder paths are showing up there?
If it’s just one path, which is it, exactly?
And is that folder still in existence?
Does it have at least one file in it?
Continuing the discussion from "Emptying Trash" doesn't remove "unavailable" content:
Hey MovieFan, thanks for the point out. I’ve had this similar structure for a long time. (probably over a decade???) where i break out the source for the items, and have never experienced this issue before (yeah screenshot for this NAS shows one of the folders as of 2015, lol, so over a decade, as I have two older servers before I even got this one).
Just to give better context here is a screenshot of that servers TV Directories:
I don’t think this is the issue, but thanks for the feedback and assistance!
Hey OttoKerner,
So parent folders Are usually under a Video Folder for the NAS, and then a sub folder of Movies or TV (or the likes) So Video\TV so far.
And then I have 1 more ‘parent’ folder typically that specifies the source (Such as “SF”) So for a good visual comparison for the screenshot I posted right before this one to MovieFan, My add folder for this one (SF Source on this NAS) would be “\GHOME2\video\TV\SF”. In the SF folder are folders for each TV Series:
I ALWAYS add this way.
Yes this Parent folder still exists. That said, for the original example of “Sakamoto days” that "unavailable file’s Folder no longer exists (SAKAMOTO DAYS (2025) {edition-Netflix}…)
and here is the screenshot snippet for the add folders as well, (as i know pictures sometimes are better than my wordy comments :))
PS thanks for the reply
The file is looking for is at “ghome2/video/tv/sf”. There is no “video” folder so pms thinks this location isn’t accessible and won’t change anything. Recreate the path all the way to “sf” and place 1 file in there, any file. Add the path to the library. Now empty trash.
Same problem here, starting last month.
Every time I delete a file, it’s not removed.
This worked for years. I’m running always last versions.
The only solution for me is walking through episodes one by one and click “remove” for the unavailable files….
Empty trash do nothing, analyze neither…
Any idea?
Thanks
Thanks for the response! Sorry the original screenshot was bad for the nas folder, as that image was from a ‘network folder’ Win 11 file explorer view, See updated screenshot with the actual network path, which does exist. My bad for using the wrong view initially, I can see how easy it is to interpret that.
Can you refresh the show and then get me the server logs.
Same problem here, though I don’t have an equivalent of the SF folder, I’ve deleted the show folder that the file was in.
I’m on 1.42.1.10060 on Linux in docker.
The same solution of allowing deletion and “deleting” from Plex the shows that are entirely unavailable (but haven’t been marked as trash after scans), works for me too.
If I’m understanding the discussion correctly, you’re supposed to leave all the folders (show and seasons) but delete only all of the video files inside, then it’ll work as intended? That seems a little… strange?
Sorry, For some reason i never see when you reply (probably just me missing it).
I’ve since manually deleted these items so the problem isn’t currently existent on any shows that I’m aware of. If you’d still like me to refresh and send server logs I’d be happy to, but wanted to make sure they were relevant if the problem has manually been solved already?
Logs won’t show anything at this point. If the problem comes back, provide the logs and i can look then.
I’m still experiencing this issue with version 1.42.2.10156.
For testing purposes, I used the official Plex docker image.
My library folder is structured as follows:
/mnt/cloud/test/video/tv/1923 (2022)/Season 1/1923.S01E01.mp4
/mnt/cloud/test/video/tv/Away (2020)/Season 1/Away.S01E01.mp4
The folder registered in the Plex library is:
/mnt/cloud/test/video/tv
In this setup, I tested by moving the /mnt/cloud/test/video/tv/1923 (2022) and /mnt/cloud/test/video/tv/Away (2020) folders outside the library folder.
The first few times, after moving them and performing a scan, they would automatically disappear from the library.
However, if I repeatedly move them by folder, at some point they didn’t be marked as trash, but their episodes are become “unavailable.”
Here’s a scan log from when episodes were become unavailable:
Nov 04, 2025 16:55:05.323 [259211884470496] DEBUG - Activity: registered new activity 5abdfb44-c714-4d20-97db-6054d751da1a - "Scanning"
Nov 04, 2025 16:55:05.323 [259211884470496] DEBUG - Scanning section 1
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Activity: updated activity 5abdfb44-c714-4d20-97db-6054d751da1a - completed 0.0% - Scanning test
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Job was already killed, not killing again.
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Asked to cull library timeline before time 1762241705, we're starting with 49 items.
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Library timeline cull complete with 49 items left.
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Scanning test using ko-KR(Plex TV Series) with 2 current media items and 1 section locations in the database.
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - Performing a scan with 'Plex TV Series' (language: ko-KR virtual: 0).
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - * Scanning /mnt/cloud/test/video/tv
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - * Marking media not available in /mnt/cloud/test/video/tv
Nov 04, 2025 16:55:05.324 [259211884470496] DEBUG - * Taking 2 items out of the map (which has 2 items) for being unavailable.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking 2 directories out of the map (which has 5 dirs) for being unavailable.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking directory 'Away (2020)/Season 1' (9) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking parent directory 'Away (2020)' (8) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking parent directory '' (1) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking directory '1923 (2022)/Season 1' (11) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking parent directory '1923 (2022)' (10) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - * Taking parent directory '' (1) out of map.
Nov 04, 2025 16:55:05.325 [259211884470496] DEBUG - Activity: updated activity 5abdfb44-c714-4d20-97db-6054d751da1a - completed 99.0% - Scanning test
Nov 04, 2025 16:55:05.326 [259211884470496] DEBUG - Scanner [Plex TV Series]: Idle and left with 2 media items.
Nov 04, 2025 16:55:05.326 [259211884470496] DEBUG - Removing 0 media items that were left.
Nov 04, 2025 16:55:05.326 [259211884470496] DEBUG - Removing 0 directories that were left.
/mnt/cloud/test/video/tv folder does not contain 1923 (2022) and Away (2020) folders anymore.
Even though the log indicates attempts to delete directories 8, 9, 10, and 11 from the database, nothing is actually deleted from the database.
Even running “Optimize Database” doesn’t remove the deleted paths from the directories table in the database.
I have to manually delete the files from the Plex web interface or set the deleted_at value for the corresponding paths in the directories table to move them to the trash.
Trash mark does not appear anywhere, but episodes are marked as unavailable.
Your logs say the folder is unavailable. We’re the 2 folders you removed the only 2 folders? Plex will treat an empty folder the same as if the drive didn’t exist and will not remove anything. Leave already 1 file, any file, and it should remove the videos from your library.
You are absolutely right.
I had only created two folders for testing.
As you said, when I leave one in the root folder, the metadata for the non-existent videos is deleted as intended.
I didn’t know about this until you told me.
Until now, whenever many videos became unavailable like this, I had to delete them one by one.
You’ve solved a problem I’ve been dealing with for a long time.
Thank you.
So, if a library’s root folder is completely empty, the metadata for that root folder won’t be marked as trashed.
If you want to delete them, you can simply exclude that root folder from the library. (because It’s already empty)
Or if you leave at least one video file in the root folder, the metadata for the other non-existent videos will be treated as trashed.
It doesn’t even have to be a video file.
Any file will do. Even a zero byte text file.





