# Change local of instalation of \\.julia

**URL:** <https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010>\
**Category:** New to Julia\
**Created:** [January 26, 2021, 8:30pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010 "2021-01-26T20:30:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [January 26, 2021, 8:30pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/1 "2021-01-26T20:30:27Z")

</div>

Dear all,  
I having problems with my user’s name: `C:\Users\Usuário\.julia` (from Brazil), where all packages are installed (because the name “Usuário”).  
However, I cannot control where packages are installed neither the name’s folder.  
How can I change this folder, for example, to  
`C:\JuliaPro-1.5.3-1`?  
There is a command to do this automatically?  
Because when I copy and paste the folder .julia~ (where all packages are installed) to the desired local, ocours several problems.  
Many thanks.

---

<div class="post-metadata">

**Author:** ![Fliks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fliks/32/2494_2.png) [@Fliks](https://discourse.julialang.org/u/Fliks)\
**Post date:** [January 26, 2021, 9:23pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/2 "2021-01-26T21:23:41Z")

</div>

You can use the JULIA\_DEPOT\_PATH environment variable to set where julia installs packages.  
See [Environment Variables · The Julia Language](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH).

---

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [January 26, 2021, 9:43pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/3 "2021-01-26T21:43:31Z")

</div>

I cannot do this. Please, provide the correct command. I am a new user. Thanks.

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [January 26, 2021, 9:55pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/4 "2021-01-26T21:55:31Z")

</div>

Go to environment variables and create a new variable called JULIA\_DEPOT\_PATH. Its contents should be the desired path to your .julia folder. Something like: C:\julia.julia  
If the variable exists just modify the path inside.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 26, 2021, 11:01pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/5 "2021-01-26T23:01:58Z")

</div>

In Julia there is a variable called `DEPOT_PATH`. For me on Windows, it looks like this:

```julia
julia> DEPOT_PATH
3-element Array{String,1}:
 "C:\\Users\\kittisopikulm\\.julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\local\\share\\julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\share\\julia"

```

You can also control it by setting the environmental variable `JULIA_DEPOT_PATH`.

I will start with the archaic way of doing on this on Windows via command prompt:

1. Windows button + R to open the Run Dialog
2. Type in “cmd.exe”
3. Type in “set JULIA\_DEPOT\_PATH=C:\JuliaDepot;” and then push [ENTER]. Note the semicolon. Type this without quotes.
4. Type in “julia” and then push [ENTER]. This assumes that `julia.exe` is on your PATH.
5. If julia.exe is not on your PATH, you may need to give the full location. For me this, julia.exe is located in “C:\Users\kittisopikulm\AppData\Local\Programs\Julia 1.5.0\bin\julia.exe”

Within Julia, you will now get the following:

```julia
julia> DEPOT_PATH
4-element Array{String,1}:
 "C:\\JuliaDepot"
 "C:\\Users\\kittisopikulm\\.julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\local\\share\\julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\share\\julia"

```

It may be necessary to remove the `.julia` folder or the specific packages in your `.julia` folder to use the above. The other solution would be to fully specify the `DEPOT_PATH` as

```julia
set JULIA_DEPOT_PATH="C:\JuliaDepot;%LOCALAPPDATA%\Julia 1.5.3\local\share\julia;%LOCALAPPDATA%\Programs\Julia 1.5.3\share\julia"

```

Adjust the above for your julia version.

---

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [January 27, 2021, 1:31am UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/6 "2021-01-27T01:31:13Z")

</div>

Dear, Thank you very much for the details. Almost there!

Ok, I have opned the terminal. In julia, when I type:

```julia
DEPOT_PATH

```

appears:

```julia
julia> DEPOT_PATH
4-element Array{String,1}:
 "C:\\JuliaDepot"
 "C:\\Users\\Usuário\\.julia"
 "C:\\Users\\Usuário\\AppData\\Local\\JuliaPro-1.5.3-1\\Julia-1.5.3\\local\\share\\julia"
 "C:\\Users\\Usuário\\AppData\\Local\\JuliaPro-1.5.3-1\\Julia-1.5.3\\share\\julia"

```

I don’t want the folder “Usuário”. I have crieted a new folder in the following path:

```julia
C:\JuliaNovo

```

My last question: how can I adapt the code:

```julia
set JULIA_DEPOT_PATH="C:\JuliaDepot;%LOCALAPPDATA%\Julia 1.5.3\local\share\julia;%LOCALAPPDATA%\Programs\Julia 1.5.3\share\julia"

```

to my situation? I replace `%LOCALAPPDATA%` to `C:\JuliaNovo` only?

I have tried to do this but failed:

 ![print](https://global.discourse-cdn.com/julialang/original/3X/7/9/79063d3b07ad42af4d996db840c825e6252deb11.png)

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 27, 2021, 4:40pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/7 "2021-01-27T16:40:09Z")

</div>

The set syntax is specific to Windows batch scripting in the command prompt `cmd.exe`.

Within Julia, you just need to manipulate the DEPOT\_PATH array:

```julia
julia> DEPOT_PATH
3-element Array{String,1}:
 "C:\\Users\\kittisopikulm\\.julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\local\\share\\julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\share\\julia"

julia> DEPOT_PATH[2]
"C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\local\\share\\julia"

julia> DEPOT_PATH[2] = "C:\\JuliaNovo\\Julia 1.5.0\\local\\share\\julia"
"C:\\JuliaNovo\\Julia 1.5.0\\local\\share\\julia"

julia> DEPOT_PATH
3-element Array{String,1}:
 "C:\\Users\\kittisopikulm\\.julia"
 "C:\\JuliaNovo\\Julia 1.5.0\\local\\share\\julia"
 "C:\\Users\\kittisopikulm\\AppData\\Local\\Programs\\Julia 1.5.0\\share\\julia"

```

My recommendation, however, is that you install Julia to a different location and then permanently set the `JULIA_DPEOT_PATH` using these instructions:

> **[How to change environment variables on Windows 10 | Architect Ryan](https://www.architectryan.com/2018/08/31/how-to-change-environment-variables-on-windows-10/)**
>
> Thoughts from Ryan Hoffman, an experienced team leader, software architect and developer.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/a/ba46c575f035434841dd3eb0f072b2a371c21117.png)

---

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [January 27, 2021, 6:49pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/8 "2021-01-27T18:49:27Z")

</div>

Thank you so much! wonderfull.  
You are very patient.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 28, 2021, 4:43am UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/9 "2021-01-28T04:43:55Z")

</div>

> [@angeloaliano1](#):
>
> á

My pleasure. I’m a bit annoyed that `á` breaks things. I think this is actually a Windows issue rather than a Julia issue. I’m interested what the root issue actually is.

---

<div class="post-metadata">

**Author:** ![zanoptics](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zanoptics/32/219193_2.png) [@zanoptics](https://discourse.julialang.org/u/zanoptics)\
**Post date:** [October 29, 2025, 4:29pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/10 "2025-10-29T16:29:30Z")

</div>

Follow-up questions: I made it but not permanent. Everything goes back to what it originally is after I close the cmd windows. My main concern is to change the place where julia install the package (somewhere in C drive) to another drive, say E drive.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [November 7, 2025, 3:06pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/11 "2025-11-07T15:06:49Z")

</div>

Did you follow the second set of instructions to permanently set the environment variables?

---

<div class="post-metadata">

**Author:** ![zanoptics](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zanoptics/32/219193_2.png) [@zanoptics](https://discourse.julialang.org/u/zanoptics)\
**Post date:** [November 7, 2025, 3:15pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/12 "2025-11-07T15:15:18Z")

</div>

Which one are you referring to

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [November 7, 2025, 3:16pm UTC](https://discourse.julialang.org/t/change-local-of-instalation-of-julia/54010/13 "2025-11-07T15:16:06Z")

</div>

These ones:

> **[How to change environment variables on Windows 10 | Architect Ryan](https://www.architectryan.com/2018/08/31/how-to-change-environment-variables-on-windows-10/)**
>
> Thoughts from Ryan Hoffman, an experienced team leader, software architect and developer.

[![](https://global.discourse-cdn.com/julialang/original/3X/b/a/ba46c575f035434841dd3eb0f072b2a371c21117.png) ](https://global.discourse-cdn.com/julialang/original/3X/b/a/ba46c575f035434841dd3eb0f072b2a371c21117.png)
