# Change location of .julia

**URL:** <https://discourse.julialang.org/t/change-location-of-julia/21540>\
**Category:** New to Julia\
**Created:** [March 6, 2019, 3:08pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540 "2019-03-06T15:08:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Stillwell](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@Jack\_Stillwell](https://discourse.julialang.org/u/Jack_Stillwell)\
**Post date:** [March 6, 2019, 3:08pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/1 "2019-03-06T15:08:48Z")

</div>

I am currently in the process of installing Julia in the ChromeOS shell. I have julia running OK, but I cannot seem to install some packages because the .julia directory is located in the noexec home folder. I would like to move .julia to a different location, but am having trouble finding information on how to do that for v1.1.0.

How can I change the location of .julia?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [March 6, 2019, 3:15pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/2 "2019-03-06T15:15:25Z")

</div>

A symlink might be easiest. Within Julia, I think it’s `DEPOT_PATH`.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 6, 2019, 3:21pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/3 "2019-03-06T15:21:08Z")

</div>

See [Environment Variables · The Julia Language](https://docs.julialang.org/en/v1.2-dev/manual/environment-variables/#JULIA_DEPOT_PATH-1)

---

<div class="post-metadata">

**Author:** ![Jack\_Stillwell](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@Jack\_Stillwell](https://discourse.julialang.org/u/Jack_Stillwell)\
**Post date:** [March 6, 2019, 5:24pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/4 "2019-03-06T17:24:09Z")

</div>

export JULIA\_DEPOT\_PATH=“/usr/local/.julia” in my .bashrc did the trick, 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 16, 2020, 12:17pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/5 "2020-01-16T12:17:35Z")

</div>

For anyone wondering how to make this work on Windows, here is an example I used to move the `.julia` folder in the Julia installation folder. I simply created a new environment variable `JULIA_DEPOT_PATH `with the following three paths `C:\Julia-1.3.1\.julia\;C:\Julia-1.3.1\local\share\julia\;C:\Julia-1.3.1\share\julia\`. Basically the first path sets the new `.julia` folder location.

I needed to move the `.julia` folder because I generated a new sysimage with `Plots` bundled and wanted to use it on multiple computers by simply copying it. The original `.julia` location was hindering this because each computer had a different username.

This approach makes the Julia installation (with the `.julia` and packages) on Windows more portable, as long as the user sets the environment variable with the corresponding paths.  
I am also planning to make a .bat file to add more easily the environment variable.

Working on this made me wonder if the Windows Julia installer could be modified in order to offer the user the possibility to choose the location for the `.julia` folder.

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 6, 2021, 2:52pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/6 "2021-07-06T14:52:59Z")

</div>

Does this still work in `VERSION=1.6`?

I’m on Windows and used:

```julia
C:\Users\user>set JULIA_DEPOT_PATH="C:\.julia"

C:\Users\user>echo %JULIA_DEPOT_PATH%
"C:\.julia"

```

After that I deleted my `C:\Users\user\.julia` folder and started julia.

But this happend:

```julia

(@v1.6) pkg> st
      Status `C:\Users\user\.julia\environments\v1.6\Project.toml` (empty project)

```

---

<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:** [July 7, 2021, 7:10am UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/7 "2021-07-07T07:10:35Z")

</div>

For me it still works. I set the Depot path manually using the environment variables window, but this shouldn’t matter. I never tried however setting it directly to C:. Maybe start julia as admin?

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 7, 2021, 8:13am UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/8 "2021-07-07T08:13:47Z")

</div>

> [@How to change .julia folder location](https://discourse.julialang.org/t/how-to-change-julia-folder-location/64193):
>
> Hey all, Usually the .julia folder location is in the home directory of the current user. I want to change that. But it for example on c:.julia. I read that therefore I have to change the global variable JULIA\_DEPOT\_PATH with set JULIA\_DEPOT\_PATH="C:\.julia" on windows. But that didn’t work. How would I do that correctly?

---

<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:** [July 7, 2021, 11:08am UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/9 "2021-07-07T11:08:59Z")

</div>

I double checked using C: location:

```julia
(@v1.6) pkg> st
      Status `C:\.julia\environments\v1.6\Project.toml` (empty project)

```

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 7, 2021, 11:27am UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/10 "2021-07-07T11:27:03Z")

</div>

Sorry I got it to work. I just posted the solution thread above. Thx!

---

<div class="post-metadata">

**Author:** ![Cong\_Minh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cong_minh/32/28558_2.png) [@Cong\_Minh](https://discourse.julialang.org/u/Cong_Minh)\
**Post date:** [August 25, 2021, 6:01pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/11 "2021-08-25T18:01:33Z")

</div>

hi guys  
i am a newbie Julia  
i have created my own environment and named it “demo”, i want the downloaded packages to be in the demo folder, i have activated the demo environment, why when i use the command “add PyCall” the packages get installed put in folder C? I don’t want to use C folder for installing package.  
please help me, i am using julia 1.6

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/1/817e8d2556c2f140b5d33d3bdc93d2bc7373f3ad.png)

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 25, 2021, 6:24pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/12 "2021-08-25T18:24:37Z")

</div>

the [solution of this post](https://discourse.julialang.org/t/change-location-of-julia/21540/3) answers your question and please don’t ask duplicated question in short interval

---

<div class="post-metadata">

**Author:** ![Chao\_Kong](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chao_kong/32/206615_2.png) [@Chao\_Kong](https://discourse.julialang.org/u/Chao_Kong)\
**Post date:** [January 29, 2024, 2:18pm UTC](https://discourse.julialang.org/t/change-location-of-julia/21540/13 "2024-01-29T14:18:11Z")

</div>

For whom wondering this: this is simply because you should use:

```julia
set JULIA_DEPOT_PATH=C:\.julia

```

rather than

```julia
set JULIA_DEPOT_PATH="C:\.julia"

```
