After you already have the Solana CLI installed on your system, you can quickly update to the latest version using the CLI itself.
To update, run the update command:
solana-install update
This will auto download and update your local CLI to the correct "channel version" you have selected.
Your channel version is likely set to "stable" by default when you install the Solana CLI. So when you run the update command, it will look for a newer "stable" version (aka the version that is tagged with the "stable" tag on the GitHub repo aka the mainnet version)
If you want to easily update to a different channel version (e.g. stable
, beta
, and edge
), you can update your install config.yml file and change your desired channel version.
To do this, open your config file like so:
nano ~/.config/solana/install/config.yml
And update the config declaration for explicit_release
, changing the last part to edge
, beta
, or stable
:
explicit_release: !Channel edge