Clean DB doesn't work

I’m running RPi2B:
uname -a
Linux sp13rpi2 4.14.78-2-osmc #1 SMP PREEMPT Sun Oct 28 14:59:13 UTC 2018
Clean install in August, updated lately, but when I removed something from NAS and then I do “Clean Library” in the OSMC: Main -> Settings -> Media -> Library -> Clean Library these files (Movies / Serie) not disappears… so when I choose them in the Library I got error msg that file not available if I want to remove it.

Any idea why?

Is there any cmd which wipe out whole library? I just add new HDDs to our NAS, so I moved whole Series part to other part of NAS, so I would like to avoid to cleaning one series part one by one…
Other option I see is to remove whole profile Library and scan it again… is there smarter way?

Thank you very much.

This is likely your issue. Kodi does have some problems with the way it handles the database, and moving a video from one path to another and then cleaning the library can cause exactly the issue you see. The way that works is to remove files completely from all paths that Kodi knows about, clean the library, then put them in the new place and scan for new content.

At this point, you probably will have to at least mark the old and new sources in Kodi as “no content” (which forces a more complete clean), then change them back to the right kind of content and rescan. If that doesn’t work, you’ll have to completely remove the sources and re-add them.

I have tried both ways:

  1. remove file from NAS, clean DB, put file to another folder on NAS, scan DB => result => two files in Kodi
  2. move file from one NAS folder to other NAS folder => same result => two files in Kodi

ad 1) the issue remain even when I remove file forever (not move), it remain in Kodi DB after clean and rescan … I have to “play” file and then remove manually when Kodi stated “file is not on FS”.

So, I guess, I will have to remove all multimedia paths from Kodi profile, then try clean, add paths back and rescan… still easier then to remove files one by one :frowning: is a great tool for scanning, cleaning and many other things for the kodi library. Read more about it here: [RELEASE] Texture Cache Maintenance utility