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. update the CLI:

    if Workbench:

    1. run the Particle: Update CLI command

    if stand-alone CLI

    1. open a terminal (powershell, cmd.exe, bash, zsh, etc)
    2. 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. in Workbench, run Particle: Launch CLI and type the aforementioned commands into the terminal pane that launches.

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

4 Likes