How can i purge missing items from my library?

Server Version#:1.25.2.5319-c43dc0277
Player Version#:1.39.1.2763-300bb607
windows 10 home 64bit

so i reorganized some of my music folders on my hard drive, and plex has re-scanned and found them in their new locations, but it is also showing duplicate copies where they used to be located. i tried ‘update library’ from the server pop-up menu on the taskbar, but the player is still showing the albums in both the new location and the old one.

i looked pretty thoroughly through all of the menus i could find, and searched the help / FAQ section but can’t find anything about purging links to folders that have been moved or deleted.

i do realize that i can go through and manually delete each of the dupes from my library, but it seems like there should be a way to tell plex to go through and remove all of the ‘dead links’ that no longer point to a folder on my hard drive…did i miss it somewhere?

Emptying trash for library should remove any showing as “unavailable”

If you mean old library root folder you should be able to remove it from the library settings. When a root folder just goes missing it does not delete everything incase it was a drive becoming unexpectedly disconnected.

2 Likes

tried that just now…it told me the trash was emptied, but when i opened the player again it is still showing both copies.

i should probably mention that my music folders pre-date my plex installation (by a quarter century), and isn’t exactly in the recommended structure…i wouldn’t think that “exists” or “doesn’t exist” could be confused because of that, but in browsing the forum for a solution to this i noticed other posts referring to the search engine being ‘tricked’ by a different directory organization.

ok without knowing how you have things organized. my second comment was regarding the library root folder

Like if you had

Music/Rock
Music/Classical
Music/Country

all as library root folders then moved all your Rock into

Music/Grunge
Music/Hair bands

then you need to make sure to remove the Music/Rock from the library root folders if it really does not exist anymore.

but again I don’t know how you moved things around to give you more than that generic advice.

sorry, i had disregarded the ‘root directory’ part because that wasn’t what i was doing (but maybe i should?)

i can try to explain better (if you can bear with my asperger’s, lol)

an example of the relevant directory section on my hard drive would be:
DRIVE:\MP3s\from CD*GROUP*\

in this instance i was copying some albums from CD-R storage to my hard drive. as there were multiple artists, i dropped all of the albums in the “from CD” folder (where plex scanned them…in the future i will turn off the server before adding folders), and then i moved the albums into their respective artists’ folders where they were scanned again. i did ‘move’ the folders, so there is no longer a folder at the old location, but plex doesn’t seem to realize that.

…but mentioning a drive becoming disconnected also reminds me…

i had a drive go ‘unavailable’ temporarily once, and windows changed my music drive from F: to E: which caused a bunch of useless dupes as well when the drive changed back to F:. they might have been taken out by a trash emptying though, i don’t think i have seen one recently. i was having the same basic problem there, but from a different angle (if that helps get us on the same page).

oh, and my root directory for plex library is just the main “MP3s” directory

…and i see a backslash got parsed out of my directory structure!
there should be one after “from CD”, and those asterisks were supposed to italicize “GROUP” as a variable…

So ...\MP3s is the single root directory then in that you have additional subfolders like CD-R which then contain the individual directories for artists/albums?

Sorry I am really confused. Can you just take one track that has a duplicate and show what that tracks actual new path is, and the old path for that track was.

sorry…that is one of my asperger’s things. when i try to make things as clear as i can they wind up being more confusing to others, lol.

here is the actual path to track 1 from one of the albums in question (cut and paste from the ‘info’ tab of the ‘edit’ box selected by the pencil icon on the album’s thumbnail):
F:_MP3s_FROM CD–KINKS\Kinks - 1975 The Kinks Present Schoolboys in Disgrace\01 - Schooldays.mp3

…but right next to that is another thumbnail, and it shows the old path (which no longer exists):
F:_MP3s_FROM CD\Kinks - 1975 The Kinks Present Schoolboys in Disgrace\01 - Schooldays.mp3

that thumbnail still thinks the album is in its old location and i can’t get plex to take it away by emptying trash or re-scanning the drive…only by manually selecting every individual duplicate and then deleting them (with two confirmations each!)

hopefully that is a better explanation…sorry again for the confusion.
any thoughts?

edit: sorry…parsing problems again! i am placing blanks to either side of the backslashes as they seem to be causing problems for the text editor…

the ‘good’ path is:
F: \ _MP3s \ _FROM CD \ --KINKS \ Kinks - 1975 The Kinks Present Schoolboys in Disgrace \ 01 - Schooldays.mp3

and the old (no longer existing) path is:
F: \ _MP3s \ _FROM CD \ Kinks - 1975 The Kinks Present Schoolboys in Disgrace \ 01 - Schooldays.mp3

OK well if in your library settings you only have F: \ _MP3s as a root directory then that is probably the issue.

It should be F: \ _MP3s \ _FROM CD since you have the FromCD subfolder there.

The first folder that the scanner should see is the artist folder ( though not optimal the album folder would work too)

because it still sees the FromCD folder it does not know the whole thing is missing since the root did not go that far.


As far as what to do now. To delete a whole bunch of the albums with not existing page at once you could…

  1. When viewing by Albums and you can see the duplicates, sort the library by Date Added. This should have the all the working albums at the start grouped together, then the nonworking ones grouped together after that.
  2. When hovering on one of the album covers of the non-working ones click on the circle that show on the top left of the album cover. Then hold down shift key and select the circle on the last album
  3. now that you have all the albums with a bad path selected, at the top there should be a bar with X Items selected and from the ... menu you can choose delete to get rid of them all at once.

I’m not sure how many albums you have but it is possible that not all get selected because of the way the page loads if scroll to the bottom too fast.

Of course another options is just to delete and recreate the library.

hope that all makes sense.

sorry, got busy with other priorities…

i had thought about deleting and re-creating the catalog, but that would get rid of all of the corrections and changes i have made to it so far, right?

assuming that is true (and i still might do that, but i’d prefer not) see if you can follow me here:

my directory structure wasn’t designed with thoughts of “how will a search engine look at this?” in mind (obviously, lol), and is broken into many categories to help me keep track of what is what and help my brain’s search engine.

the first sub directories of the main MP3s directory are things like “NEW RIPS” for my recent copies, “INCOMPLETE”, “AUDIOBOOKS”, “READY TO CATALOG” for albums that are ready to be written to CDR/DVDR, and as seen. “FROM CD” for things coming back from those CDs.

each of those sub directories are filled with album directories in the " [group] - [year] [album] " format, with an additional sub for groups with more than four or five albums (like the example of the kinks album above).

the largest of those subdirectories, “READY TO CATALOG”, is also broken down into genres like “CLASSIC ROCK”, “COMEDY”, “NEW AGE”, “CLASSICAL”, etc. with the album folders (and possible group folders) in those genre directories. example:
F: \ _MP3s \ __READY TO CATALOG \ _CLASSIC ROCK \ --JOURNEY \ Journey - 1979 Evolution \ 01 - Majestic.mp3

when i first set up plex, i figured that all of the albums were in sub directories of “MP3s”, so i set that as the library’s root directory, and it seemed to find everything just fine (and it still finds new items with no problem)…it just doesn’t always seem to notice when they go away, and i can’t seem to make it understand.

so, in order for plex to find things better, should i set a library directory for each of the MP3s sub directories (“NEW RIPS”, “AUDIOBOOKS”, etc.) as well as the genre directories (“FOLK”, “CLASSICAL”, etc.) in the “READY TO CATALOG” directory? will that somehow help plex to realize that a directory has been moved or deleted?

dunno why i didn’t think to link this before but this has links to expected naming and organization of things. Support Articles | Plex Support

basicially when you add a folder to a library that next folder should be the things being indexed not another subfolder

Since Journey is the artist folder being indexed in this case

F: \ _MP3s \ __READY TO CATALOG \ _CLASSIC ROCK \ --JOURNEY \ Journey - 1979 Evolution \ 01 - Majestic.mp3

You would add ``F: \ _MP3s \ __READY TO CATALOG \ _CLASSIC ROCK ` to the library and every other genre folder

if you had your movies separated out into genre folders then you would need to do like this

Because when it does the scan for it expects the first folder it sees after those roots as the folder for the movie itself.

/Volumes/Media/Movies/Science Fiction/Aliens (1974)/Aliens (1974).mkv

thanks! i’ll give that a shot and see if it behaves better with my non-standard directories.

BTW, i had actually looked at the suggested naming conventions, but they do not give enough context for me to keep track of what files are from where…not to mention i wasn’t really up for renaming half a terabyte of music files.

somewhere in there it also mentioned that if the files weren’t in the format it was looking for that it would “do its best”, so i figured i would give it a shot “as is” and see how it went.

as i said, i just started it at my main “MP3s” directory since all of my music was within that folder, and it worked like a charm finding everything, it just doesn’t always seem to notice when something goes away.

i may yet delete the library and start over in order to remove all the faulty entries…is there any way to keep the “updates” i have made to the library so far? like the album covers i have uploaded, ‘matches’ that i have fixed, reviews i have added, etc.?

might i suggest a “clean up library” function which would go through and flag any albums in the library which plex can not find on the hard drive? you could have the option to delete them, or not (say if a drive temporarily becomes ‘unavailable’ for some reason). you could also have an option to search for or relocate them if a drive ‘moves’ from C: to F: which would keep the plex data for that album and just point it at the new location.

You would likely need to do some direct editing of the database file but I am not personally very good at that and it is can be a dangerous thing to do but I will see if I can find someone who might be able to give an idea how to do it.

Would you mind taking a screen shot of the Get Info of one of the tracks that has the duplicates. I mean this screen

sorry for the delay again…i wish i could have a day to spend on this with nothing else to do, lol!

i’m pretty sure i deleted all of the dupes (that i found, anyhow), but here is the info box you requested for the kinks track above (which had been duplicated previously).

i haven’t even tried to use plex for my video content yet! a lot of it is in DVD format which i understand plex doesn’t deal with, but i do have a lot of MPGs and AVIs. that might be my next media project, but i’d like to get this one down first. ;o) i will keep that directory info in mind when i do…

thought of a couple more questions about changing my library directories…

when i change plex’s library directories from my ‘catch all’ MP3s directory to the various sub directories, i will be excluding a few folders that i didn’t really want cataloged in the first place. what will plex do with those albums that it cataloged previously now that they are not in one of plex’s library folders? will i need to manually delete all of that stuff too?

also, there are a few overloaded “GROUP " folders that are broken further into “STUDIO”, “BOOTLEGS”, “SOLOS”, and “TRIBUTES” (the " group - year album” folders containing the MP3s within those). since those albums are a level deeper, should i set library folders at their respective group folders, even though they are in a subdirectory of a folder that is already set?

in other words…

for the directories we talked about earlier:

F: \ _MP3s \ __READY TO CATALOG \ _CLASSIC ROCK \ --JOURNEY \ Journey - 1979 Evolution \ 01 - Majestic.mp3

you say i should set plex’s library folder at “CLASSIC ROCK”…what will happen with:

F: / _MP3s / __READY TO CATALOG / _PROGRESSIVE ROCK / --PINK FLOYD / SOLOS / Richard Wright - 1978 Wet Dream / 01 - Mediterranean C.mp3

if i already have a library folder set to “__PROGRESSIVE ROCK”, should i also set one at the “–PINK FLOYD” level (or maybe at the “SOLOS” level?) since those folders are deeper in the hierarchy?

There really should not be a Solos Level

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