How do I list all installed packages from the command line in bash / osX

46,016

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

Share:
46,016

Related videos on Youtube

Mowzer
Author by

Mowzer

Just here to learn and grow as a coder/developer. I appreciate all the knowledge others share and I try to help out where I can. I am very thankful for your wisdom and grateful that you are willing to share it. I always ACCEPT and UPVOTE answers! Here's proof! My formula for writing questions. State your goal. Describe the behavior you expect to see. Describe what you actually see. List the detailed steps to recreate the problem. (Optional) Describe any solutions you might have tried or areas where you think the problem might be. Ask the actual question itself. (Highlighting optional). Show your code. (Preferably in a demo like jsBin, plunkr, jsFiddle or CodePen.) See this example SO question.

Updated on September 18, 2022

Comments

  • Mowzer
    Mowzer over 1 year

    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.