Delete items OH 3.0?

Just started with OH 3.0 and one of the first thing I did was to import my items from my 2.5 system. That was maybe not the best way to go as now I can’t change them.
I would like to remove them all (+300) in one stroke. Is it a simple way to that ? If I try to remove them one at a time i get error message saying “An error occurred while deleting: Not Found”.

You can remove all Items by stopping OH and deleting the Items and the Links and the Metadata JSONDB files. Restart OH and all Items will be gone. If there are some you need to keep you can click on Select and then check next to all the Items you want to delete and then click on Remove to delete them.

1 Like

Ok, I’am a first class newbee regrading linux. How can I remove the files? I don’t have permission to remove these files from Win 10 using samba. Also tried SSH with the same result.

if your using openhabian on a raspberry pi then one of the tools in the openhabian-config tool is a “fix file permissions” option (option 14 in openhabian 1.6.2)

as which user ?
You either need to be the user that owns the file or you need root privileges.
You can use

sudo rm /path/to/file

to remove a file.

1 Like

Thanks, now i could remove the 3 files in folder /var/lib/openhab/jsondb. Restarted Rpi , logged into UI and the items was still there !!

Did I remove the wrong files?

Do you have .items files in /etc/openHAB/items? Did you stop openHAB before deleting the files?

Yes, I have .items files in that folder. And yes I stopped openHAB before I changed the privileges and deleted the files.

Well, anything defined in .items files isn’t going to disappear unless you delete those files. And anything defined in those files is going to take precedence over anything in the JSONDB. And anything defined in those files is not going to be editable in the UI.

Problem solved. Thank you

Have to issue an openhab-cli clean-cache command also.

Easier way, for those who want to know:
(in openhab-console)
openhab:items clear