How to remove julia from homebrew casks?

I have an old version of julia that was probably installed via homebrew (I am running on MacOS).
When I ran brew upgarde I got this:

==> Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them.
==> Upgrading 1 outdated package:
julia 0.6.4 -> 1.7.2
==> Upgrading julia
==> Downloading https://julialang-s3.julialang.org/bin/mac/x64/1.7/julia-1.7.2-mac64.dmg
######################################################################## 100.0%
==> Backing App 'Julia-0.6.app' up to '/usr/local/Caskroom/julia/0.6.4/Julia-0.6.app'
==> Removing App '/Applications/Julia-0.6.app'
==> Unlinking Binary '/usr/local/bin/julia'
==> Purging files for version 1.7.2 of Cask julia
==> Purging files for version 1.7.2 of Cask julia
Warning: Reverting upgrade for Cask julia
==> Moving App 'Julia-0.6.app' to '/Applications/Julia-0.6.app'
==> Linking Binary 'julia' to '/usr/local/bin/julia'
Error: julia: It seems there is already an App at '/Applications/Julia-1.7.app'.

I would like to remove julia from brew casks so it will NOT upgrade it when I run brew upgrade. How can I do that?

I would think that removing the version you installed by hand and then upgrading Homebrew will work.

Don’t know why you would want to “remove julia from brew casks”.

so you mean simply delete the application file Julia-0.6 from my Applications folder?

No, it appears to me that you already have an installation of Julia-1.7.2 in /Applications.
brew tries to upgrade from 0.6 to 1.7.2 and fails because of that, i.e.

Error: julia: It seems there is already an App at '/Applications/Julia-1.7.app'.

What I’m saying is, delete /Applications/Julia-1.7.2 and try brew upgrade julia again.
Version 0.6 will be archived by brew if the upgrade is successfull and no longer be available under /Applications. If that is okay for you, proceed as detailed.

Or the other way around, brew remove julia?

1 Like

Or that, but OP says

so it will upgrade it when I run brew upgrade.

They appear to want to manage their installation via brew.

When juliaup becomes stable for MacOS, I would use that by the way.

Sorry for my typo! I meant that I do NOT want brew to manage my julia upgrade. I want to do it myself.
So I guess that @gustaphe is right, and I can just do brew remove julia, right?

Yes! :slight_smile:

1 Like

Haha, I read it wrong the way you meant it.

1 Like