The safest thing to do is to reinstall OpenClaw after uninstalling it, but to determine whether you want to keep the old data. The official update documentation clearly states that the installation script can be re-ran; The migration guide also reminds that '~/.openclaw/' includes more than just configuration, but also credentials, sessions, and workspace files.
The reinstallation order is recommended to go like this
- Back up the old state first: 'openclaw backup create'.
- Rerun installer: 'curl -fsSL https://openclaw.ai/install.sh | bash`。
- Re-onboarding: 'openclaw onboard' or 'openclaw onboard --flow quickstart'.
- Finally, execute 'openclaw doctor', 'openclaw gateway restart', and 'openclaw status'.
If you're moving from an old machine, don't just copy 'openclaw.json'. The official migration page clearly states: the entire state directory, 'credentials/', sessions, and workspace files must be brought together, otherwise there will be a situation where "it looks like it's installed, but the account and session are actually gone".
If you just want to restore the environment to a clean state and go through onboarding again, you can clean up the old state and let the installer generate a new default directory. This is best suited for scenarios where you have just uninstalled and are ready to reconnect the gateway.
Summary: The most important thing before reinstalling OpenClaw is not to be quick, but to decide whether to "migrate old data" or "start from scratch".