Learning Node? Download my free Node Handbook ๐Ÿ”ฅ

To see the latest version of all the npm package installed, including their dependencies:

npm list


โฏ npm list
โ””โ”€โ”ฌ cowsay@1.3.1
  โ”œโ”€โ”€ get-stdin@5.0.1
  โ”œโ”€โ”ฌ optimist@0.6.1
  โ”‚ โ”œโ”€โ”€ minimist@0.0.10
  โ”‚ โ””โ”€โ”€ wordwrap@0.0.3
  โ”œโ”€โ”ฌ string-width@2.1.1
  โ”‚ โ”œโ”€โ”€ is-fullwidth-code-point@2.0.0
  โ”‚ โ””โ”€โ”ฌ strip-ansi@4.0.0
  โ”‚   โ””โ”€โ”€ ansi-regex@3.0.0
  โ””โ”€โ”€ strip-eof@1.0.0

You can also just open the package-lock.json file, but this involves some visual scanning.

npm list -g is the same, but for globally installed packages.

To get only your top-level packages (basically, the ones you told npm to install and you listed in the package.json), run npm list --depth=0:

โฏ npm list --depth=0
โ””โ”€โ”€ cowsay@1.3.1

You can get the version of a specific package by specifying the name:

โฏ npm list cowsay
โ””โ”€โ”€ cowsay@1.3.1

This also works for dependencies of packages you installed:

โฏ npm list minimist
โ””โ”€โ”ฌ cowsay@1.3.1
  โ””โ”€โ”ฌ optimist@0.6.1
    โ””โ”€โ”€ minimist@0.0.10

If you want to see what’s the latest available version of the package on the npm repository, run npm view [package_name] version:

โฏ npm view cowsay version