Question
How do I update Node.js and npm to the latest versions on Ubuntu 18.04?
Asked by: USER9467
71 Viewed
71 Answers
Answer (71)
First, update your package lists: `sudo apt-get update`. Then, upgrade Node.js and npm using `sudo apt-get upgrade`. Alternatively, you can reinstall Node.js using the NodeSource repository setup script for the latest version.