Upgrade Spin
Are You on the Latest Version?
The best way to know if you’re on the latest version of Spin is to run spin --version
:
$ spin --version
You can compare the output from the above command with the latest release release listed in the Spin GitHub repository (which is also shown in the image below):
Upgrade Spin
Spin can be installed in many ways, and therefore the upgrade procedure can differ between users. Here are a few suggested ways to upgrade Spin to the latest version. If you’re not sure how or where you installed your current version of Spin try using the which
command on Linux and macOS and the where
command on Windows, as shown below:
$ which spin
$ which spin
$ where spin
Cargo
If you originally followed the documentation’s Cargo install method, please revisit to reinstall.
Hint: Your Spin executable will likely be in the following location:
~/.cargo/bin/spin
Installer
If you originally followed the documentation’s installer script method, please revisit to reinstall.
Hint: Your Spin executable will likely be in the following location:
/usr/local/bin/spin
Source
If you followed the documentation’s install from source method please revisit to reinstall.
Hint: Your Spin executable will likely be in the following location (where you originally cloned the Spin repository):
~/spin/target/release/spin
Homebrew
If you installed Spin using Homebrew please use the following commands to upgrade Spin.
$ brew update
$ brew upgrade fermyon/tap/spin
Troubleshooting
If you have upgraded Spin and don’t see the newer version, please consider the following.
Not Seeing the Latest Version?
It may be possible that you have installed Spin using more than one of the above methods. In this case, the Spin executable that runs is the one that is listed first in your PATH
system variable.
If you have upgraded Spin yet still see the old version using spin --version
this can be due to the order of precedence in your PATH
. Try echoing your path to the screen and checking to see whether the location of your intended Spin executable is listed before or after other pre-existing installation paths:
echo $PATH
/Users/my_user/.cargo/bin:/usr/local/bin
Paths are separated by the
:
(colon)
In the above case, the Cargo install method’s installation will take precedence over the installer script method’s installation.
In this case, you can either remove the Cargo installation of Spin using cargo uninstall spin-cli
or update your system path to prioritize the Spin binary path that you prefer.