docs/manage/core.md
The core asdf command list is rather small, but can facilitate many workflows.
Covered in the Getting Started guide.
asdf exec <command> [args...]
Executes the command shim for the current version.
<!-- TODO: expand on this with example -->asdf env <command> [util]
asdf info
A helper command to print the OS, Shell and asdf debug information. Share this when making a bug report.
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 .
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.0
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.
To uninstall asdf follow these steps:
::: details Bash & Git
~/.bashrc remove the lines that source asdf.sh and the completions:. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
$HOME/.asdf dir:rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Bash & Git (macOS)
~/.bash_profile remove the lines that source asdf.sh and the completions:. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
$HOME/.asdf dir:rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Bash & Homebrew
~/.bashrc 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
Completions may have been configured as per Homebrew's instructions so follow their guide to find out what to remove.
brew uninstall asdf --force
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details 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.
~/.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
Completions may have been configured as per Homebrew's instructions so follow their guide to find out what to remove.
brew uninstall asdf --force
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Bash & Pacman
~/.bashrc remove the lines that source asdf.sh and the completions:. /opt/asdf-vm/asdf.sh
pacman -Rs asdf-vm
$HOME/.asdf dir:rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Fish & Git
~/.config/fish/config.fish remove the lines that source asdf.fish:source ~/.asdf/asdf.fish
and remove completions with this command:
rm -rf ~/.config/fish/completions/asdf.fish
$HOME/.asdf dir:rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Fish & Homebrew
~/.config/fish/config.fish remove the lines that source asdf.fish:source "(brew --prefix asdf)"/libexec/asdf.fish
brew uninstall asdf --force
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Fish & Pacman
~/.config/fish/config.fish remove the lines that source asdf.fish:source /opt/asdf-vm/asdf.fish
pacman -Rs asdf-vm
$HOME/.asdf dir:rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Elvish & Git
~/.config/elvish/rc.elv remove the lines that use the asdf module: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
$HOME/.asdf dir:if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Elvish & Homebrew
~/.config/elvish/rc.elv remove the lines that use the asdf module: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
brew uninstall asdf --force
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details Elvish & Pacman
~/.config/elvish/rc.elv remove the lines that use the asdf module: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
pacman -Rs asdf-vm
$HOME/.asdf dir:if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details ZSH & Git
~/.zshrc remove the lines that source asdf.sh and completions:. "$HOME/.asdf/asdf.sh"
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
compinit
OR the ZSH Framework plugin if used.
$HOME/.asdf dir:rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details ZSH & Homebrew
~/.zshrc remove the lines that source asdf.sh:. $(brew --prefix asdf)/libexec/asdf.sh
brew uninstall asdf --force && brew autoremove
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
::: details ZSH & Pacman
~/.zshrc remove the lines that source asdf.sh:. /opt/asdf-vm/asdf.sh
pacman -Rs asdf-vm
$HOME/.asdf dir:rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
asdf config files:rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
:::
That's it! 🎉