16

When deploying Node and NPM on Ubuntu 20.04 I noticed that when you run sudo apt install npm it details a massive number of dependencies that it want's to install with it. Why is this? Surely it doesn't require all these packages to run the package manager?

1 Answers1

12

You can reduce the number of installed packages by providing --no-install-recommends:

sudo apt-get install npm --no-install-recommends

Comparison for minimal 20.04 LTS system:

  • sudo apt-get install npm

    0 upgraded, 516 newly installed, 0 to remove and 0 not upgraded.

  • sudo apt-get install npm --no-install-recommends

    0 upgraded, 313 newly installed, 0 to remove and 0 not upgraded.

N0rbert
  • 103,263