Is there a terminal command to upgrade from 1.1.0 to 1.1.1 ?

I installed Julia from a binary.

There are no such things as e.g. julia --update which I am guessing is what you are after.

However, updating is as easy as downloading and extracting, so you could do something like

$ curl https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.1-linux-x86_64.tar.gz |
  tar -xz -C /path/to/some/directory
2 Likes

Do I need to uninstall Julia first ?

The Julia “installation” has two components: the binaries and the “depot”. You can replace the binaries at your whim, as long as you have the JULIA_BINDIR set. Your packages, environments and configuration are typically stored in ~/.julia. None of this will care at all about the upgrade from 1.1.0 to 1.1.1. When you run Julia it will just realize that a bunch of the pre-compile cache’s are out of date and re-build those as necessary. If you upgrade from 1.1 to 1.2 (not released yet) or even 1.0 to 2.0, for example, the process will be similar, except that it will default to a new package environment (by default these are associated with the first two numbers of the version).

So, in summary, you can always just go ahead and replace your binaries.

3 Likes

So, I cd into the folder where the file is saved, then unzip and install it into an already created folder ?

I tried to overwrite the old version but that didnt happen, so I just changed the system path env variable to point to the new folder .

IMHO, deleting and re-installing the whole thing isn’t that difficult (at least, under *nix).

  1. rm -rf {your-old-julia-binary-folder}

  2. using @fredrikekre’s command

    Given that your shell history size is large enough, you may retrieve the /path/to/some/directory by reverse search Ctrl+r.

This is quicker and cleaner the overwriting existing Julia’s directory. For installed packages, ~/.julia/ with automatically take care of them. For instance, you have v1.0 and v1.1 in ~/.julia/compiled.

In practice, Pkg> st and Pkg> update in the new version will take care of everything.

2 Likes

What is the “st” in st and Pkg ?

It is short for status, the Pkg REPL mode command: 11. REPL Mode Reference · Pkg.jl

1 Like