Automatically update all your global NodeJS packages

To automatically update your global NodeJS packages just issue the following command. It will list outdated packages and update them via `npm install -g`.


```bash
npm install -g $(npm outdated -g | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)
```

Zeno Popovici
12 Nov 2021
« Back to post