Can I upgrade Node.js using `apt` package manager on Ubuntu? What are the drawbacks?

Question

Grade: Education Subject: Support
Can I upgrade Node.js using `apt` package manager on Ubuntu? What are the drawbacks?
Asked by:
84 Viewed 84 Answers

Answer (84)

Best Answer
(259)
Yes, you can use `apt`: `sudo apt update && sudo apt upgrade nodejs`. However, the versions available through `apt` are often outdated. This can lead to compatibility issues with newer packages and features. Nvm is generally preferred for the latest versions.