I am currently running the latest stable version of Libreelec on my RPI3B+ and have done so for many years now. I have all sorts of repos installed but mainly use my Kodi to play the videos I have stored on my external HD. I am interested in upgrading to Leia when that is stable, but how do I go about installing it “clean” as they say, so I get rid of all the repos and nonsense I have installed over the years but keep my video library intact (as that took me AGES to get Kodi to recognize correctly)?
You should make backups of your userdata/Database folder to specifically save the MyVideos*.db and the Textures13.db files. You could also do a Video Library Export which will create .nfo files (and fanart if selected) next to your local/network video files.
Besides that, LibreELEC has 2 reset functions (soft and hard) in the Settings Add-on. You can choose whichever is applicable to you.