A simple, POSIX-compliant shell script to update all tools managed by Volta.
- Comprehensive Updates: Updates all Volta-managed tools (like Node.js, npm, Yarn, and any installed global packages) to their latest versions based on your configured channels (
ltsorlatest). - Safe Dry Runs: Preview potential changes with the
--dry-runflag before applying them. - Self-Update: Optionally updates Volta itself to the latest version before updating your tools.
- Flexible Exclusions: Skip updates for specific tools using the
--excludeflag. - Portable: Works in any POSIX-compliant shell (e.g.,
sh,dash), nobashrequired.
- Volta must be installed and available in your
PATH. - Standard Unix utilities:
curland a POSIX-compliantawk(these are included by default in macOS and most Linux distributions). - To update pnpm you must export
export VOLTA_FEATURE_PNPM=1before running the script (Volta's feature flag).
-
Make the script executable:
chmod +x volta-update-all.sh
-
Run the script:
./volta-update-all.sh
| Flag | Description |
|---|---|
--dry-run |
Show what would change without making any installs. |
--self-update |
Update Volta itself before updating other tools. |
--exclude a,b,c |
Comma-separated list of tool names to skip. |
-h, --help |
Display the help message. |
Update everything except for yarn:
./volta-update-all.sh --exclude yarnPerform a dry run after updating Volta itself:
./volta-update-all.sh --self-update --dry-runYou can configure the update channels by modifying the variables at the top of the script:
NODE_CHANNEL: The update channel for Node.js. Defaults tolts. Change tolatestfor the newest Node.js version.DEFAULT_CHANNEL: The update channel for all other tools. Defaults tolatest.
This project is licensed under the MIT License. See the LICENSE file for details.
Created by Dominik Roblek © 2025