Uninstall Asdf
How to uninstall asdf on a Mac when it was installed with Homebrew.
Switching from asdf? I recommend Mise. Mise is a faster, modern alternative to asdf with the same plugin ecosystem. See the article Mise vs asdf and how to Install Mise on Mac.
If you are using the Ruby language, see the article Compare Ruby Version Managers. After you uninstall asdf, you can Install Ruby with Mise.
Uninstalling asdf is one step in setting up your Mac for development. See the full roadmap to set up a Mac for software development.
Before you get started
You'll need a terminal application to uninstall asdf. Apple includes the Mac terminal but I prefer Warp Terminal. Warp is an easy-to-use terminal application, with AI assistance to help you learn and remember terminal commands. Download Warp Terminal now; it is FREE and worth a try.
Why uninstall asdf?
You may need to uninstall asdf if:
- You want to use a different version manager (switching from asdf to another).
- Asdf is not behaving as you expect and you want to install it from scratch.
- You are no longer using asdf and you want to free storage space.
What is asdf?
Asdf is a version manager. Developers use it to install programming languages and switch among language versions as needed. Asdf is popular because it can manage versions of many languages, for example, Ruby, Python, and Node.
Steps
Here are the steps to remove asdf (see details in this guide).
- Run diagnostics before removing asdf.
- Uninstall asdf using Homebrew.
- Run diagnostics after removing asdf.
- Remove asdf artifacts.
Remove a language version
Are you sure you need to remove asdf? Perhaps you just need to uninstall a language version. In this example, you will see how to remove Ruby.
First list all Ruby installed versions.
$ asdf list ruby
4.0.2
Then uninstall any version.
$ asdf uninstall ruby 4.0.2
If you don't remove a language version, the files will remain on your disk after you have removed asdf.
Before removing asdf, run diagnostics
Run a diagnostic to list all the packages you have installed with Homebrew. You should see asdf and its dependencies.
$ brew list
==> Formulae
asdf automake libtool m4 readline
autoconf coreutils libyaml [email protected] unixodbc
You can also display a list of packages with their dependencies.
$ brew deps --tree --installed
asdf
├── autoconf
│ └── m4
├── automake
│ └── autoconf
│ └── m4
├── coreutils
├── libtool
│ └── m4
├── libyaml
├── [email protected]
├── readline
└── unixodbc
└── libtool
└── m4
autoconf
└── m4
automake
└── autoconf
└── m4
coreutils
libtool
└── m4
libyaml
m4
[email protected]
readline
unixodbc
└── libtool
└── m4
Finally, you can see a list of asdf files installed with Homebrew. This example is from Homebrew on Apple Silicon (M-series), where Homebrew files are installed in /opt/homebrew.
$ brew list asdf
/opt/homebrew/Cellar/asdf/0.8.1/asdf.fish
/opt/homebrew/Cellar/asdf/0.8.1/asdf.sh
/opt/homebrew/Cellar/asdf/0.8.1/asdf_updates_disabled
/opt/homebrew/Cellar/asdf/0.8.1/ballad-of-asdf.md
/opt/homebrew/Cellar/asdf/0.8.1/bin/asdf
/opt/homebrew/Cellar/asdf/0.8.1/CONTRIBUTING.md
/opt/homebrew/Cellar/asdf/0.8.1/defaults
/opt/homebrew/Cellar/asdf/0.8.1/docs/scripts/docsify-edit-on-github.js
/opt/homebrew/Cellar/asdf/0.8.1/docs/ (17 files)
/opt/homebrew/Cellar/asdf/0.8.1/etc/bash_completion.d/asdf.bash
/opt/homebrew/Cellar/asdf/0.8.1/help.txt
/opt/homebrew/Cellar/asdf/0.8.1/lib/commands/ (28 files)
/opt/homebrew/Cellar/asdf/0.8.1/lib/ (3 files)
/opt/homebrew/Cellar/asdf/0.8.1/libexec/private/asdf-exec
/opt/homebrew/Cellar/asdf/0.8.1/lint.sh
/opt/homebrew/Cellar/asdf/0.8.1/release/ (2 files)
/opt/homebrew/Cellar/asdf/0.8.1/SECURITY.md
/opt/homebrew/Cellar/asdf/0.8.1/share/fish/vendor_completions.d/asdf.fish
/opt/homebrew/Cellar/asdf/0.8.1/share/zsh/site-functions/_asdf
/opt/homebrew/Cellar/asdf/0.8.1/test/fixtures/ (17 files)
/opt/homebrew/Cellar/asdf/0.8.1/test/ (28 files)
/opt/homebrew/Cellar/asdf/0.8.1/Vagrantfile
/opt/homebrew/Cellar/asdf/0.8.1/VERSION
Uninstall asdf from Homebrew
Here is how to uninstall asdf from Homebrew:
$ brew uninstall --force asdf
Remove the unused asdf dependencies.
$ brew autoremove
After removing asdf, run diagnostics
Run the diagnostics to confirm you have uninstalled asdf from Homebrew.
$ brew list
==> Formulae
$ brew deps --tree --installed
$ brew list asdf
Error: No such keg: /opt/homebrew/Cellar/asdf
Remove asdf artifacts
Remove the asdf configuration from the ~/.zshrc file:
. /usr/local/opt/asdf/asdf.sh
Remove all asdf configuration files from your user directory:
$ rm -rf ~/.asdf/
$ rm -rf ~/.tool-versions
Done!
That is it! You have uninstalled asdf.
After you uninstall asdf, you can Install Mise on Mac. If you only use Ruby, you can also Install Ruby with rv.
If you are using the Ruby language, you can Install Ruby with Mise.
Continue setting up your Mac
Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.