# How to upgrade easily?

**URL:** https://discourse.julialang.org/t/how-to-upgrade-easily/27753
**Category:** New to Julia
**Tags:** juliaup
**Created:** [August 20, 2019, 11:26am UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753 "2019-08-20T11:26:33Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![mystis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mystis/32/9327_2.png) [@mystis](https://discourse.julialang.org/u/mystis)
#### Post date: [August 20, 2019, 11:26am UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/1 "2019-08-20T11:26:33Z")

</div>

Hi,

I see there are threads about updates but is there a way to easily update Julia ?

I’d hope for something like : `] update julia`

without the hassle to download a new version, remove the old one, etc.

---

<div class="post-metadata">

### Author: ![christopher-dG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher-dg/32/7387_2.png) [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)
#### Post date: [August 20, 2019, 12:04pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/2 "2019-08-20T12:04:44Z")

</div>

It’s not possible to upgrade Julia from within Julia, sorry. If you don’t want to manually download binaries you could use something like [asdf](https://asdf-vm.com/#/) to manage that for you.

---

<div class="post-metadata">

### Author: ![oliver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliver/32/19264_2.png) [@oliver](https://discourse.julialang.org/u/oliver)
#### Post date: [August 20, 2019, 12:08pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/3 "2019-08-20T12:08:12Z")

</div>

The Debian Julia Team currently packages a release of Julia (currently 1.0.4), when that is updated a user only needs to conduct their regular `apt update/upgrade`.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [August 20, 2019, 12:16pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/4 "2019-08-20T12:16:52Z")

</div>

If one is willing to mix in packages from Debian’s unstable branch (`sid`), [Julia 1.1.1](https://packages.debian.org/search?keywords=julia&searchon=names&suite=all&section=all) is also available.

Not sure that the apt configuration (upgrade this, but nothing else) is less of a hassle though than just downloading the tarball, and extracting. Or even compiling from source. Given that releases don’t happen that frequently, I would just do either of the latter.

---

<div class="post-metadata">

### Author: ![mystis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mystis/32/9327_2.png) [@mystis](https://discourse.julialang.org/u/mystis)
#### Post date: [August 20, 2019, 12:19pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/5 "2019-08-20T12:19:26Z")

</div>

alright, thanks for letting me know !

---

<div class="post-metadata">

### Author: ![oliver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliver/32/19264_2.png) [@oliver](https://discourse.julialang.org/u/oliver)
#### Post date: [August 20, 2019, 12:48pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/6 "2019-08-20T12:48:55Z")

</div>

If I remember correctly there was concern from the package maintainer that Julia is changing too quickly for it to be worth their effort keeping it current relative to other projects. OTHO Julia is enjoying steady growth by users of the OS.

[https://qa.debian.org/popcon.php?package=julia](https://qa.debian.org/popcon.php?package=julia)

---

<div class="post-metadata">

### Author: ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)
#### Post date: [November 8, 2019, 7:27pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/7 "2019-11-08T19:27:48Z")

</div>

If you download the newer Julia version (whichever it is), uninstall the older one, then what is the proper, best (and easiest) way to install the newer one and keep your Julia package system intact?

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [November 8, 2019, 7:53pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/8 "2019-11-08T19:53:19Z")

</div>

This is the process I use for installing a new Julia version: [Transitioning from Ubuntu PPA to official binaries - #2 by rdeits](https://discourse.julialang.org/t/transitioning-from-ubuntu-ppa-to-official-binaries/28650/2)

If you are only changing _patch_ versions (e.g. from 1.2.3 to 1.2.4), then your packages will be unchanged, and you don’t need to do anything. If you are installing a new minor version (e.g. from 1.2 to 1.3) then your packages will not carry over. But it should be easy to use the package manager to ensure that you get the same set of packages in the new version that you had before.

For example, if you had Julia 1.2 installed, and you then added Julia 1.3, you could do:

```julia
cp ~/.julia/environments/v1.2 ~/.julia/environments/v1.3

```

and then launch Julia and do:

```julia
pkg> instantiate

```

This will tell the package manager to install the same set of packages in Julia 1.3 that you had in Julia 1.2. For most cases that should be sufficient to ensure that your new Julia version has the same package environment that your old Julia version did.

---

<div class="post-metadata">

### Author: ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)
#### Post date: [November 8, 2019, 8:10pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/9 "2019-11-08T20:10:24Z")

</div>

Thanks.

So basically uninstall the old, install the new, copy that current version directory in that environment directory and name the new one the new version number, then run instantiate.

If someone were to use a Windows machine, I assume the process is essentially the same.

Is there any downside to this method?

---

<div class="post-metadata">

### Author: ![pontus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pontus/32/10438_2.png) [@pontus](https://discourse.julialang.org/u/pontus)
#### Post date: [November 8, 2019, 9:59pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/10 "2019-11-08T21:59:35Z")

</div>

> [@rdeits](#):
>
> For example, if you had Julia 1.2 installed, and you then added Julia 1.3, you could do:
> 
> ```julia-auto
> cp ~/.julia/environments/v1.2 ~/.julia/environments/v1.3
> 
> ```
> 
> and then launch Julia and do:
> 
> ```julia-auto
> pkg> instantiate
> 
> ```

Thanks. Thats basically how I upgraded from 1.1 to 1.2 and it was completely painless, and it’s nice to have both versions installed if ever wanting to go back and try something in previous version. I followed the advice of @StevenSiew and @Tamas_Papp in these two posts in the " [Julia v1.2.0 has been released](https://discourse.julialang.org/t/julia-v1-2-0-has-been-released/27742)" announcement thread:

> [@Julia v1.2.0 has been released](https://discourse.julialang.org/t/julia-v1-2-0-has-been-released/27742/6):
>
> When I upgraded from 1.0 to 1.1, someone gave me these instructions. Are these instructions still valid for the upgrade of 1.1 to 1.2 Note that if you want to keep the same packages as in 1.0 you can copy (or rename if you are no longer using julia 1.0) the .julia/environments/v1.0 folder to .julia/environments/v1.1 $ cd ~/.julia $ cd environments/ $ ls v1.0 $ cp -rp v1.0 v1.1 $ ls -l total 0 drwxr-xr-x 4 ssiew staff 136 18 Aug 2018 v1.0 drwxr-xr-x 4 ssiew staff 136 18 Aug 2018 v1.1…

and

> [@Julia v1.2.0 has been released](https://discourse.julialang.org/t/julia-v1-2-0-has-been-released/27742/7):
>
> Pretty much yes, but of course you would have to modify cp -rp v1.1 v1.2 if you are upgrading from 1.1. symlinking everything to a common directory is also an alternative:

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [November 9, 2019, 6:02am UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/11 "2019-11-09T06:02:35Z")

</div>

Just to clarify: I would recommend symlinking as described there, not `cp`. The downside is of course that it breaks packages that depend on a particular version of Julia, but for 1.1 vs 1.2 (and even 1.3) it should not be a big problem in practice.

---

<div class="post-metadata">

### Author: ![kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kai](https://discourse.julialang.org/u/kai)
#### Post date: [August 18, 2020, 7:18pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/12 "2020-08-18T19:18:36Z")

</div>

Just installed Julia 1.5 and followed [this instruction](https://julialang.org/downloads/platform/#macos).

After running `ln -s /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia` and restarting the terminal, typing `julia` in the command line still opens Julia 1.3. This is not resolved until I removed Julia 1.3. Am I missing something?

Also the folder `.julia/environments/v1.5` was not created until I ran `Pkg.update`.

---

<div class="post-metadata">

### Author: ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)
#### Post date: [August 18, 2020, 9:53pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/13 "2020-08-18T21:53:38Z")

</div>

I think the environment folder not being created until you deal with `Pkg` is expected, but I may be wrong.

> [@kai](#):
>
> After running `ln -s /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia` and restarting the terminal, typing `julia` in the command line still opens Julia 1.3.

This is strange and the first thing that comes to my mind is that the old Julia link was not in the `/usr/local/bin/` folder but in another folder, also in the PATH, and that was checked by the shell before `/usr/local/bin/`. You could have checked this by running `which julia` before the uninstalling Julia 1.3, it would show the path to which link/binary was really being called.

---

<div class="post-metadata">

### Author: ![kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kai](https://discourse.julialang.org/u/kai)
#### Post date: [August 18, 2020, 11:13pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/14 "2020-08-18T23:13:20Z")

</div>

> [@Henrique\_Becker](#):
>
> This is strange and the first thing that comes to my mind is that the old Julia link was not in the `/usr/local/bin/` folder but in another folder

That’s probably why, because I didn’t see “julia” in that folder before running the “ln -s” command. Thank you.

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [December 21, 2024, 3:16pm UTC](https://discourse.julialang.org/t/how-to-upgrade-easily/27753/17 "2024-12-21T15:16:07Z")

</div>

The recommended way of doing this has been juliaup for a while.
