I've seen this question: How to only install updates from a specific repository? but it doesn't help.
I want to install NPM using this script: https://deb.nodesource.com/setup_10.x (not my idea, this is a requirement). This script uses a particular Launchpad PPA: ppa:chris-lea/node.js. Here's the problem:
- If I run
apt-get install --no-install-recommends nodejsI get Node.js installed from Canonical's PPA. This package lacks NPM, and is very far behind Node's last stable release (3 major versions behind). - If I run
apt-get install nodejs, I do get Node fromcris-leaPPA, and it has NPM... but it also installs a ton of unnecessary garbage.
Looking into documentation for apt-get install I cannot find a way to specify a PPA to install from. Maybe I've missed it?
PS. This should happen during CI run, so, no GUI, and, please, no editing of /etc/apt/sources and friends, please.