Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I update all npm packages/modules at once?

I'm struggling to find a way to update all npm packages in one go, some articles suggest that package.json file should be edited where all version numbers need to be changed to * therefore forcing node to grab latest versions, but others state that such method is not considered good. Ideally, I want to find a command line option for this.

like image 905
Ilja Avatar asked Nov 26 '25 02:11

Ilja


1 Answers

One simple step:

$ npx npm-check-updates -u && npm i

This will set all of your packages in package.json to the latest version and apply the updates.

like image 56
Matt Avatar answered Nov 27 '25 19:11

Matt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!