How to manually reset your CLI installation


hi there :wave:

if you installed your CLI using our installer / install script (described here) or use Workbench, read on

occasionally, the CLI will get itself into a bad state and the only fix is to reinstall it. here’s how you do that:

  1. open the directory containing the CLI’s files:
    • macOS / Linux: ~/.particle
    • Windows: C:\Users\<your username>\AppData\Local\particle
  2. delete the following files and directories if available:
    • .npm-cache
    • autoupdate
    • error.log
    • node-v8.15.0-<os>-<cpu>
      (e.g. node-v8.15.0-windows-x64, node-v8.15.0-darwin-x64, node-v8.15.0-linux-x64)
    • node_modules
    • package-lock.json
    • plugin-cache.json
    • profile.json
    • tmp
  3. open a terminal (powershell, cmd.exe, bash, zsh, etc)
  4. run particle update-cli and wait for the operation to complete (might take a bit)

once that completes, the CLI should be in a better state - you can confirm by running the particle usb list and particle serial inspect CLI commands.

if the output includes any mention of missing modules / dependencies, then the reset failed - please report the issue as described here.

Particle cli update 2.0.0 broken
Particle cli update 2.0.0 broken
Need help getting Particle Workbench Installed
closed #2

pinned #3