Using npm command, we can easily update or upgraded the Node.js.
The following command updates your Node.js with the latest version.
Command to upgrade Node.js:
npm install -g npm@latest

In my case, it removed 17 packages, and changed 64 packages as part of the Node.js update.