OpenClaw Old Version NPM Migration Fix
If OpenClaw is stuck on an old version after the NPM migration, your CLI, Gateway, or PATH may still point to an older install. This guide shows the clean fix and the easier way to run OpenClaw without local update issues.
Quick Fix: Update OpenClaw the Recommended Way
Start with the official update flow. openclaw update is the safest first command because it handles the update path and can restart the Gateway after updating.
openclaw update
openclaw --version
openclaw gateway statusIf you want to check the update before changing anything, run:
openclaw update status
openclaw update --dry-runIf the version is still old after this, the issue is usually not the package update itself. It is usually a wrong binary path, old package name, stale Gateway service, or Node version problem.
Why OpenClaw Still Shows the Old Version
OpenClaw can stay stuck on an old version when one part updates but another part still points to old code.
- Old clawdbot package is still installed
- Old moltbot package is still installed
- Terminal PATH points to an older openclaw binary
- npm installed OpenClaw into a different global folder
- Shell command cache still remembers the old command path
- Gateway service is still running old code
- Multiple Gateway services are installed
- Node.js version is too old
- Docker/container install is being confused with host npm install
OpenClaw’s official install docs list Node 24 recommended and Node 22.19+ supported, so an older Node version can break installs or updates.
Check Which OpenClaw Binary Is Running
Before reinstalling everything like a caveman with admin access, check which OpenClaw command your system is actually using.
macOS and Linux
openclaw --version
which openclaw
which -a openclaw
npm prefix -g
npm list -g openclaw --depth=0
npm view openclaw versionWindows PowerShell
where openclaw
openclaw --version
npm list -g openclaw --depth=0
npm view openclaw versionIf which -a openclaw or where openclaw shows more than one path, your system may be running an older binary before the updated npm one.
/usr/local/bin/openclaw
/home/user/.npm-global/bin/openclawIf npm updated /home/user/.npm-global/bin/openclaw but your terminal runs /usr/local/bin/openclaw, the terminal will still show the old version.
Remove Old Package Names
If your setup still uses clawdbot or moltbot, remove them and install the current openclaw package.
npm uninstall -g clawdbot moltbot
npm install -g openclaw@latest
openclaw --versionCheck npm cache safely first:
npm cache verifyOnly force-clean cache if you have a real cache problem:
npm cache clean --forceDo not keep running this:
npm install -g clawdbot@latestThat can keep you tied to the old package path instead of the current OpenClaw install.
Fix PATH If Terminal Still Uses the Old Version
Check your npm global folder and current PATH:
npm prefix -g
echo "$PATH"
which -a openclawAdd npm’s global bin folder to PATH:
export PATH="$(npm prefix -g)/bin:$PATH"For bash:
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcFor zsh:
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcVerify again:
which openclaw
openclaw --versionIf the version is now correct, the problem was PATH order. Humanity survives another environment-variable incident.
Clear Shell Command Cache
Some shells remember command locations even after you update the package.
For bash:
hash -rFor zsh:
rehashThen verify:
openclaw --version
which openclawIf it still shows the old version, close the terminal and open a new one.
Fix Gateway Still Running the Old Version
Sometimes the CLI updates correctly, but the Gateway still runs old code.
Check Gateway status:
openclaw gateway status
openclaw gateway status --deep
openclaw gateway restartIf the Gateway still looks stale, reinstall the Gateway service:
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status --deepUse gateway status --deep when you suspect stale services, duplicate services, or service metadata problems.
Check for Multiple Gateway Services
Most users should run only one OpenClaw Gateway per machine. Multiple Gateways can cause confusion unless you intentionally separate ports, config paths, state directories, and workspaces.
Run:
openclaw gateway status --deep
openclaw gateway probeIf OpenClaw reports extra services or stale clients, follow the cleanup hints from the command output. Gateway troubleshooting docs also mention using gateway status --deep or doctor --deep to identify stale OpenClaw client processes after updates or rollbacks.
Fix Node.js Version
Check your Node.js and npm versions:
node --version
npm --versionUse Node 24 if possible:
nvm install 24
nvm use 24
nvm alias default 24Then update OpenClaw again:
npm install -g openclaw@latest
openclaw update
openclaw --versionWindows Fix
On Windows, first check which OpenClaw command is active:
where openclaw
openclaw --version
node --version
npm --version
npm list -g openclaw --depth=0
openclaw gateway status --deepIf old Gateway service data is stuck, run:
openclaw gateway restart
openclaw gateway install --force
openclaw gateway restartIf Windows shows multiple openclaw.cmd paths, fix PATH order or remove the old global install. Do not assume the first openclaw.cmd is the newest one. Computers do not reward optimism.
macOS and Linux Fix
Run these checks:
which -a openclaw
openclaw --version
node --version
npm --version
npm prefix -g
openclaw gateway status --deepThen run the clean update flow:
npm install -g openclaw@latest
hash -r
openclaw update
openclaw gateway restart
openclaw gateway status --deepIf the service metadata is still stale:
openclaw gateway install --force
openclaw gateway restartOn macOS and Linux, stale launchd or systemd service data can keep pointing to old runtime paths. OpenClaw docs mention openclaw doctor --fix and openclaw gateway install --force for service repair cases. (OpenClaw)
Docker Users: npm Update Is Not Enough
If OpenClaw runs in Docker, this command updates the host CLI only:
npm install -g openclaw@latestIt does not update the running container.
Check Docker:
docker ps -a | grep openclawUpdate the Docker setup:
docker compose pull
docker compose up -dThen verify:
openclaw gateway statusIf the Gateway runs inside Docker, check the version inside the container or update the container image. Host npm and Docker are separate worlds, because apparently one runtime universe was too merciful.
Safe Reinstall If Everything Else Fails
Use this only after checking PATH, old packages, Gateway status, and Node version.
npm uninstall -g clawdbot moltbot openclaw
npm cache verify
npm install -g openclaw@latest
openclaw update
openclaw doctor --fix
openclaw gateway install --force
openclaw gateway restart
openclaw --version
openclaw gateway status --deepDo not delete ~/.openclaw just because the CLI version is old. That directory can contain config, credentials, sessions, and workspace data.
If the npm update is partially broken, you can also rerun the installer:
curl -fsSL https://openclaw.ai/install.sh | bashOpenClaw installer docs say the installer can run openclaw gateway install --force, restart the Gateway, and probe Gateway health when a Gateway service is already loaded from the same prefix. (OpenClaw)
Common Problems and Fixes
| Problem | Likely Cause | Fix |
|---|---|---|
| openclaw --version still old | PATH points to old binary | Run which -a openclaw or where openclaw |
| npm shows latest but CLI old | Different npm global prefix | Check npm prefix -g and PATH |
| Gateway still old | Service metadata/runtime not refreshed | Run openclaw gateway install --force |
| Update completed but Gateway acts old | Gateway restart skipped or failed | Run openclaw gateway restart |
| Multiple services detected | Old launchd/systemd/schtasks service still exists | Run openclaw gateway status --deep |
| Node error | Node version too old | Use Node 24 or Node 22.19+ |
| Docker still old | Host npm updated, container did not | Update Docker image/container |
| Command not found | npm global bin missing from PATH | Add $(npm prefix -g)/bin to PATH |
What Not to Do
Avoid these mistakes:
- Do not keep installing clawdbot@latest
- Do not delete ~/.openclaw just because the CLI version is old
- Do not mix npm, pnpm, bun, source, Docker, and installer paths without checking PATH
- Do not assume host npm updates Docker containers
- Do not ignore openclaw gateway status --deep
- Do not use openclaw update --verbose
- Do not use npm cache clean --force before trying npm cache verify
Easiest Way to Run OpenClaw
If you keep losing time to npm paths, Node versions, stale Gateway services, and local update issues, run OpenClaw on Ampere.sh instead.
Ampere.sh gives you managed OpenClaw hosting so you can deploy, connect your model, add channels, and keep the Gateway running without babysitting the machine.
Frequently Asked Questions
Why is OpenClaw still stuck on the old version after npm update?
Is clawdbot still the correct npm package?
Why does npm show the latest OpenClaw but my CLI shows old?
Why is the Gateway still old after the CLI updated?
What Node.js version should I use for OpenClaw?
Should I delete ~/.openclaw to fix this?
Does npm update my Docker OpenClaw install?
Also Read
Run OpenClaw on Ampere.sh
Skip local npm paths, Node version drift, and stale Gateway service issues with managed OpenClaw hosting on Ampere.sh.
Run OpenClaw on Ampere.sh →

