# Best way to update Julia

**URL:** https://discourse.julialang.org/t/best-way-to-update-julia/50483
**Category:** General Usage
**Tags:** question
**Created:** [November 20, 2020, 10:33am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483 "2020-11-20T10:33:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Flock1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/flock1/32/19583_2.png) [@Flock1](https://discourse.julialang.org/u/Flock1)
#### Post date: [November 20, 2020, 10:33am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/1 "2020-11-20T10:33:05Z")

</div>

Hi,

I want to know what’s the best way to update Julia? I used [this](https://discourse.julialang.org/t/a-proper-introduction-on-how-to-update-julia-somewhere-accessible/28166) as a reference and I realized that the path to Julia is not present in `PATH` environment variable. So I’ll probably need to uninstall Julia and install the new version.

So please let me know what should I do to update Julia to 1.5. I have 1.4 currently and I use Ubuntu 20

---

<div class="post-metadata">

### Author: ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)
#### Post date: [November 20, 2020, 11:12am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/2 "2020-11-20T11:12:05Z")

</div>

Download and extract julia to some path, e.g.,

```julia
/home/user/programs/julia/julia-1.5.0

```

open your environment file, e.g., with

```julia
sudo gedit /etc/environment

```

add your path (or edit the old path if it already exists)

```julia
/home/user/programs/julia/julia-1.5.0/bin

```

log off, and on again. Then typing `julia` in the terminal should start REPL.

---

<div class="post-metadata">

### Author: ![Flock1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/flock1/32/19583_2.png) [@Flock1](https://discourse.julialang.org/u/Flock1)
#### Post date: [November 20, 2020, 11:13am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/3 "2020-11-20T11:13:46Z")

</div>

So will this link the new Julia with the packages installed from old julia? Because I don’t want to install CUDA all over again and consume double the memory.

---

<div class="post-metadata">

### Author: ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)
#### Post date: [November 20, 2020, 11:21am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/4 "2020-11-20T11:21:55Z")

</div>

No, the packages are not withdrawn to your new environment. But I think if you add them in v1.5, and the same package versions already exists from julia 1.4 they won’t be installed twice, because all packages are stored in the hidden common folder `~./julia`. Alternatively you can try to copy the `Project.toml` and `Manifest.toml` files from the hidden folder

```julia
~./julia/environments/v1.4

```

to the one of v.1.5 therein. This should withdraw all installed packages from your old version. However, I never tried that.

---

<div class="post-metadata">

### Author: ![Flock1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/flock1/32/19583_2.png) [@Flock1](https://discourse.julialang.org/u/Flock1)
#### Post date: [November 20, 2020, 11:28am UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/5 "2020-11-20T11:28:28Z")

</div>

And what if I install julia through these managers like `Jill` or `asdf`? Because what happened was that I installed Julia 1.5 and when I ran CUDA on it, it started installed CUDA 11.1. That’s why I was asking.

---

<div class="post-metadata">

### Author: ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)
#### Post date: [November 20, 2020, 1:08pm UTC](https://discourse.julialang.org/t/best-way-to-update-julia/50483/6 "2020-11-20T13:08:44Z")

</div>

I simply do not know, because I’ve never used that. However, from the [jill documentation](https://github.com/abelsiqueira/jill) :

> if you wish to upgrade Julia and copy over the old environment to the new one, run the following:

```julia
bash jill.sh -u x.y.z

```

> Where `x.y.z` is your current version.
