How can I use homebrew to downgrade my local elixir from 1.5.0 to 1.4.4?

Unfortunately I upgraded elixir to 1.5.0 before realizing that I can’t easily get a Dockerfile for 1.5.0. How can I downgrade my homebrew installation of elixir to 1.4.4?

Thanks.

2 Likes

Hi @jononomo,

I’m not sure about Docker and I know homebrew supports “downgrading” to older versions of installed packages globally but I would highly recommend using a version manager such as asdf (https://github.com/asdf-vm/asdf ) instead. This allows you to have multiple copies of erlang, elixir, and nodejs (among many other languages) installed simultaneously on your Mac. You can then switch between those versions globally and/or on a per-project basis using a simple .tool-versions file.

This makes it a breeze to upgrade or test Elixir 1.5 and Erlang/OTP 20.0 but still use the older known working versions for all of your existing projects and be able to switch between the versions with ease.

3 Likes

Thanks for a great tip, @tme_317 !

1 Like

In addition to @tme_317’s advice on using asdf on your local environment. We are publishing Docker images of some asdf tools at asdf-alpine which of course includes latest elixir:

docker run --rm -ti vborja/asdf-alpine:elixir-1.5.0-otp-20 iex
1 Like

Just for completeness sake: you can ‘go back’ if you still have the old version installed. The homebrew command for this is brew switch <package> <version>, so in your case brew switch elixir 1.4.4. I also agree with previous comments, asdf is a nice version manager :smiley:

4 Likes

Kiex is also worth mentioning.

3 Likes

Hello guys I already have installed elixir with homebrew.
But for learn and I want to change the version of elixir and so I think to manage this I needed to install the asdf manager. But I already have installed elixir with homebrew.
So I just see this Post and I notice it’s possible to switch with homebrew.
So for instal or downgrade another versions of elixir. What I need to do with homebrew?
It’s better use this asdf manager?

2 Likes