Macos – How to list all installed packages from the command line in bash / osX

bashcommand linemacmacosshell

What is the -bash command to list all the packages installed locally on my machine?

I am using osX.

I tried the following so far:

  1. dpkg -l – doesn't work.
  2. apt --installed list – doesn't work.
  3. pkgutil --pkgs – lists only those installed with Apple installer. I need all those installed with npm.
  4. npm list – works.
  5. npm list -g --depth=0 – works.
  6. ls `npm root -g` – works.

Best Answer

pkgutil --pkgs will list all the packages installed with Apple's installer

Related Question