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 infoA 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 CLI allow global installation of executables, for example, installing Yarn 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 shimversions <command>Lists the plugins and versions that provide shims for a command.
As an example, Node.js ships with two executables, node and npm. When many versions of the tools are installed with asdf-nodejs shimversions can return:
➜ asdf shimversions node
nodejs 14.8.0
nodejs 14.17.3
nodejs 16.5.0➜ asdf shimversions npm
nodejs 14.8.0
nodejs 14.17.3
nodejs 16.5.0Update
Please use the same method you used to install asdf to update it. The latest version of asdf is shown in the top right corner of this page.
Uninstall
To uninstall asdf follow these steps:
Bash & Git
- In your
~/.bashrcremove the lines that sourceasdf.shand the completions:
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"- Remove the
$HOME/.asdfdir:
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Bash & Git (macOS)
- In your
~/.bash_profileremove the lines that sourceasdf.shand the completions:
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"- Remove the
$HOME/.asdfdir:
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Bash & Homebrew
- In your
~/.bashrcremove the lines that sourceasdf.shand the completions:
. $(brew --prefix asdf)/libexec/asdf.sh
. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bashCompletions may have been configured as per Homebrew's instructions so follow their guide to find out what to remove.
- Uninstall with your package manager:
brew uninstall asdf --force- Run this command to remove all
asdfconfig 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.
- In your
~/.bash_profileremove the lines that sourceasdf.shand the completions:
. $(brew --prefix asdf)/libexec/asdf.sh
. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bashCompletions may have been configured as per Homebrew's instructions so follow their guide to find out what to remove.
- Uninstall with your package manager:
brew uninstall asdf --force- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Bash & Pacman
- In your
~/.bashrcremove the lines that sourceasdf.shand the completions:
. /opt/asdf-vm/asdf.sh- Uninstall with your package manager:
pacman -Rs asdf-vm- Remove the
$HOME/.asdfdir:
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Fish & Git
- In your
~/.config/fish/config.fishremove the lines that sourceasdf.fish:
source ~/.asdf/asdf.fishand remove completions with this command:
rm -rf ~/.config/fish/completions/asdf.fish- Remove the
$HOME/.asdfdir:
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Fish & Homebrew
- In your
~/.config/fish/config.fishremove the lines that sourceasdf.fish:
source "(brew --prefix asdf)"/libexec/asdf.fish- Uninstall with your package manager:
brew uninstall asdf --force- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Fish & Pacman
- In your
~/.config/fish/config.fishremove the lines that sourceasdf.fish:
source /opt/asdf-vm/asdf.fish- Uninstall with your package manager:
pacman -Rs asdf-vm- Remove the
$HOME/.asdfdir:
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Elvish & Git
- In your
~/.config/elvish/rc.elvremove the lines that use theasdfmodule:
use asdf _asdf; var asdf~ = $_asdf:asdf~
set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~and uninstall the asdf module with this command:
rm -f ~/.config/elvish/lib/asdf.elv- Remove the
$HOME/.asdfdir:
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Elvish & Homebrew
- In your
~/.config/elvish/rc.elvremove the lines that use theasdfmodule:
use asdf _asdf; var asdf~ = $_asdf:asdf~
set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~and uninstall the asdf module with this command:
rm -f ~/.config/elvish/lib/asdf.elv- Uninstall with your package manager:
brew uninstall asdf --force- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"Elvish & Pacman
- In your
~/.config/elvish/rc.elvremove the lines that use theasdfmodule:
use asdf _asdf; var asdf~ = $_asdf:asdf~
set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~and uninstall the asdf module with this command:
rm -f ~/.config/elvish/lib/asdf.elv- Uninstall with your package manager:
pacman -Rs asdf-vm- Remove the
$HOME/.asdfdir:
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"ZSH & Git
- In your
~/.zshrcremove the lines that sourceasdf.shand completions:
. "$HOME/.asdf/asdf.sh"
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
compinitOR the ZSH Framework plugin if used.
- Remove the
$HOME/.asdfdir:
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"ZSH & Homebrew
- In your
~/.zshrcremove the lines that sourceasdf.sh:
. $(brew --prefix asdf)/libexec/asdf.sh- Uninstall with your package manager:
brew uninstall asdf --force && brew autoremove- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"ZSH & Pacman
- In your
~/.zshrcremove the lines that sourceasdf.sh:
. /opt/asdf-vm/asdf.sh- Uninstall with your package manager:
pacman -Rs asdf-vm- Remove the
$HOME/.asdfdir:
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"- Run this command to remove all
asdfconfig files:
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"That's it! 🎉