4

I want to get the most recent version of nodejs installed, so I add the ppa:chris-lea/node.js .

but does it mean when I run apt-get install nodejs, it will install the package from the ppa instead of the official repository???

How does apt-get determine from which source to install a package???

1 Answers1

6

By default apt-get searches all available package sources and installs the package with the highest version number.

apt-cache policy nodejs

shows you all packages for nodejs with their versions from your package sources and tells you which one it would install ("Candidate").

There are some weays to change this behaviour, see for example How to prevent updating of a specific package?