The installation and settings are in the same database as the library.
First take a database backup of your existing database.
Then disable all Storage in Settings/Storage, clean up Library (Settings/Library/Library maintenance) and make a new backup with no Storage enabled. This should be a backup of your installation and settings only.
Delete everything in the Roon folder and reinstall Roon.
Restore from backup you made with no storage.
Add new or edited Storage or re-enable existing Storage as you wish.
Remember to take an initial backup, it is your insurance policy if anything goes wrong.
Did you performed all 3 choices at the library maintenance tab? I do not perform the last one, cause the 131398 files are associated with an external hard disk I almost never use. Should save some space…
Why does the 1 GB bother you?
I performed only the first 2 because the third is empty (0 songs to clear).
I have 5000 entries on the history that are connected to nothing (Tidal) that bother me and that 1GB of database I’m not bother about the size but because I don’t understand why if the library is empty it will occupy 1GB of space.
Picking and choosing which parts of the database you want to preserve isn’t something Roon supports right now. Generally speaking Roon is designed to deliver the best performance and user experience possible, as opposed to smaller database on disk, particularly in light of storage costs these days.
Feel free to open a feature request if this kind of functionality is important to you, but I’m going to move this to the Software category – in this case, things seem to be “working as designed” so this isn’t a support question.