Core

The core asdf command list is rather small, but can facilitate many workflows.

Installation & Setup

Covered in the Getting Started guide.

Exec

asdf exec <command> [args...]

Executes the command shim for the current version.

Env

asdf env <command> [util]

Info

asdf info

A helper command to print the OS, Shell and asdf debug information. Share this when making a bug report.

Reshim

asdf reshim <name> <version>

This recreates the shims for the current version of a package. By default, shims are created by plugins during installation of a tool. Some tools like the npm CLIopen in new window allow global installation of executables, for example, installing Yarnopen in new window via npm install -g yarn. Since this executable was not installed via the plugin lifecycle, no shim exists for it yet. asdf reshim nodejs <version> will force recalculation of shims for any new executables, like yarn, for <version> of nodejs .

Shim-versions

asdf shim-versions <command>

Lists the plugins and versions that provide shims for a command.

As an example, Node.jsopen in new window ships with two executables, node and npm. When many versions of the tools are installed with asdf-nodejsopen in new window shim-versions can return:

➜ asdf shim-versions node
nodejs 14.8.0
nodejs 14.17.3
nodejs 16.5.0
➜ asdf shim-versions npm
nodejs 14.8.0
nodejs 14.17.3
nodejs 16.5.0

Update

asdf has a built in command to update which relies on Git (our recommended installation method). If you installed using a different method you should follow the steps for that method:

MethodLatest Stable ReleaseLatest commit on master
asdf (via Git)asdf updateasdf update --head
Homebrewbrew upgrade asdfbrew upgrade asdf --HEAD
PacmanDownload a new PKGBUILD & rebuild
or use your preferred AUR helperopen in new window

Uninstall

To uninstall asdf follow these steps:

Bash & Git
  1. In your ~/.bashrc remove the lines that source asdf.sh and the completions:
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
1
2
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Bash & Git (macOS)
  1. In your ~/.bash_profile remove the lines that source asdf.sh and the completions:
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
1
2
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Bash & Homebrew (macOS)

If using macOS Catalina or newer, the default shell has changed to ZSH. If you can't find any config in your ~/.bash_profile it may be in a ~/.zshrc in which case please follow the ZSH instructions.

  1. In your ~/.bash_profile remove the lines that source asdf.sh and the completions:
. $(brew --prefix asdf)/libexec/asdf.sh
. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash
1
2

Completions may have been configured as per Homebrew's instructionsopen in new window so follow their guide to find out what to remove.

  1. Uninstall with your package manager:
brew uninstall asdf --force
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Bash & Pacman
  1. In your ~/.bashrc remove the lines that source asdf.sh and the completions:
. /opt/asdf-vm/asdf.sh
1
  1. Uninstall with your package manager:
pacman -Rs asdf-vm
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Fish & Git
  1. In your ~/.config/fish/config.fish remove the lines that source asdf.fish:
source ~/.asdf/asdf.fish
1

and remove completions with this command:

rm -rf ~/.config/fish/completions/asdf.fish
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Fish & Homebrew
  1. In your ~/.config/fish/config.fish remove the lines that source asdf.fish:
source "(brew --prefix asdf)"/libexec/asdf.fish
1
  1. Uninstall with your package manager:
brew uninstall asdf --force
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
Fish & Pacman
  1. In your ~/.config/fish/config.fish remove the lines that source asdf.fish:
source /opt/asdf-vm/asdf.fish
1
  1. Uninstall with your package manager:
pacman -Rs asdf-vm
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
ZSH & Git
  1. In your ~/.zshrc remove the lines that source asdf.sh and completions:
. $HOME/.asdf/asdf.sh
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
compinit
1
2
3
4
5

OR the ZSH Framework plugin if used.

  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
ZSH & Homebrew
  1. In your ~/.zshrc remove the lines that source asdf.sh:
. $(brew --prefix asdf)/libexec/asdf.sh
1
  1. Uninstall with your package manager:
brew uninstall asdf --force && brew autoremove
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc
ZSH & Pacman
  1. In your ~/.zshrc remove the lines that source asdf.sh:
. /opt/asdf-vm/asdf.sh
1
  1. Uninstall with your package manager:
pacman -Rs asdf-vm
  1. Remove the $HOME/.asdf dir:
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
  1. Run this command to remove all asdf config files:
rm -rf $HOME/.tool-versions $HOME/.asdfrc

That's it! 🎉