List Globally Installed npm Packages on Windows

See every npm package installed globally (tools like serve, nodemon, yarn) with one command.

WindowspackagesdevelopernpmLow risk
Run `npm list -g --depth=0` in any terminal.

01Command

Command
$ npm list -g --depth=0

02What it does

Global npm packages live outside any project and provide command-line tools you use everywhere — over months they pile up and you forget what's installed. `npm ls -g --depth=0` prints just the top-level global packages with their versions, without the huge dependency trees. Uninstall anything you no longer need with `npm uninstall -g <name>`.

03Risk

RiskLow risk
Requirements需已安装 Node.js/npm;只读查询。
!Warning: Without --depth=0 the output includes every transitive dependency and becomes enormous — the depth flag is what keeps this readable.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • npm-ls | npm Docs
    npm · vendor-doc · 2026-09-17
    Evidence: npm ls -g --depth=0 lists globally installed packages at the top level without their dependency trees.

Last verified: 2026-09-18 · Category: Developer

06Related solutions