For Home Assistant OS, login via ssh and then:
ha core stop rm /config/home-assistant_v2.db ha core start