@Kai & @chris I’ve noticed this in the past when deleting items but it’s always been one-off. Now that I’m restructuring a number of items I can confirm that when you delete an item (I’m 90% sure I’ve deleted both from PaperUI and definitely from HABmin) that the items are not removed from the ItemChannelLink.json file. So far I’ve deleted three items (I did manually create them in an .items file before deleting but pretty sure in the past I had not included that stepand will test tomorrow when I migrate some more items to verify that it’s independent of new items in .items files being created prior to deletion). I am manually able to delete their records from the .json file so not a big issue. They are successfully deleted from the items and things files (I’m removing the associated devices from things as well).
If someone can confirm, I’m happy to add a bug report to GitHub.
I believe that the /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json file is populated only when you use PaperUI to create a Link between a channel and an item. It contains link (item to channel) info, not purely item info.
It should have no contents if you use manually defined items to link the channels.
To clear out the contents from ItemChannelLink.json you should break the link from PaperUI.