How to upgrade Node.js from 0.12 to 7.9 in Debian?

npm cache clean -f
npm install -g n
n latest
ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node

askubuntu.com/a/480642

07

How did I upgrade Node.js from 9.4 to 20.5 in Debian 10 (Buster)?