Removing kodi movie/music content from CLI

Hi all,

I am currently unable to access my TV [Kodi] at the moment and I would like to remove content from the movie and music directories and then delete them (/home/osmc/.kodi/userdata/Database/ from what I see). I will then issue a clean-up. I would like to achieve this from CLI. I don’t believe this is possible from web-server, is that correct?

Does anyone know the order and syntax to achieve this?

Thanks in advance for suggestions.
Peace, noolidge.

Well that is a normal filesystem removal that you would do depending on where you have stored your media.

After that you would need to trigger a database cleanup that you could do remotely

Thanks, however I think I probably didnt explain that correctly :
I’m looking to remove all meta-data related to the content, not the actual media itself. My error.
As its running under osmc user, I believe some (if not all?) of the metadb is here? /home/osmc/.kodi/userdata/Database/ by default?

Thanks for the cleanup link, that should work nicely.

Yes that is the location of the database and the clean will remove all data for movies that don’t exist anymore.

I see. So the idea is moving the movies to another location and then performing the cleanup, thus clearing the metadb of content. Very good, thank you.

I am still struggling to understand what is your issue? The Metadata will be recollected by the scraper as long as your movies are back in place.

Clear as mud ! Thanks a lot.

Have a look at I think it’s what you are looking for. GitHub - MilhouseVH/ Utility script to manage the XBMC texture cache

1 Like

Thanks @nrosier, useful looking tool.

I used a combination of the cleaning / rescan and some testing with scripts as I needed to play with mount points on external usb storage too; didn’t want to go into great detail about all that as I know what I needed to do. Appreciate the response though and of course @fzinken and the link provided.