Reset Config and Databases

Hey guys,

i just wanted to know the easiest and fastest way to reset all the openhab dev environment.
So that there are no saved items, things, etc.

Thank you!

Regards, Max

1 Like

Stop openHAB.

If running apt-get installed, delete the contents of /var/lib/openhab2 run the following command

sudo apt -o Dpkg::Options::="--force-confmiss" install --reinstall openhab2

Restart openHAB.

If running manual install delete the contents of $OPENHAB_HOME/userdata.

6 Likes

Hi together,
I used that command as well to clear ghost zwave items. Unfortunately now openhab does not work anymore. (bindings do not work, status of things are not displayed…) seems like OH2 does not really start.

What do I have to reconfigure in order that the old setup is still working?
In Paper UI and Habmin, things are visible even with values…

Many thanks upfront for support…

For those that are running into errors link this:

Unpacking openhab (4.1.0-1) ...
Setting up openhab (4.1.0-1) ...

[openHAB] Running JSON Database upgrade tool (${OPENHAB_RUNTIME}/bin/upgradetool.jar).
[main] INFO org.openhab.core.tools.internal.Upgrader - Copying item unit from state description to metadata in database '/var/lib/openhab/jsondb/org.openhab.core.items.Item.json'
[main] ERROR org.openhab.core.tools.internal.Upgrader - Cannot access item database '/var/lib/openhab/jsondb/org.openhab.core.items.Item.json', check path and access rights.
[main] INFO org.openhab.core.tools.internal.Upgrader - Upgrading JS profile configuration in database '/var/lib/openhab/jsondb/org.openhab.core.thing.link.ItemChannelLink.json'
[main] ERROR org.openhab.core.tools.internal.Upgrader - Cannot access link database '/var/lib/openhab/jsondb/org.openhab.core.thing.link.ItemChannelLink.json', check path and access rights.
[openHAB] JSON Database upgrade completed.
[openHAB] openHAB was not running so will not start after upgrade.
[openHAB] Please use the command:
            sudo /bin/systemctl start openhab.service

Processing triggers for systemd (245.4-4ubuntu3.22) ...

This magic seemed to do the trick:

sudo apt -o Dpkg::Options::="--force-confmiss" install --reinstall openhab

Posting for others searching for the answer.

EDIT: I just upgraded and ran into this issue again. Running the above command again didn’t seem to resolve the issue this time.