# New Pkg - local packages / shared depot

**URL:** <https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249>\
**Category:** General Usage\
**Created:** [August 29, 2018, 4:30pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249 "2018-08-29T16:30:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![madprogrammer](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Post date:** [August 29, 2018, 4:30pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249/1 "2018-08-29T16:30:30Z")

</div>

I have been testing Julia 1.0 for a while and have some questions about the new Pkg, regarding some features that would fit my needs considering some restrictions I need to work with.

First of all, the new Pkg does not work with packages that aren’t git repositories, right? I used to download tar files (without .git folder) and manually add to PKGDIR on julia 0.6.x, but now I need to clone the repository.

That leads me to my second question. I see that choosing a package version when installing (eg. ] add Compat@v1.0.1) is a Pkg feature. But what if I clone a repository (I need to use local repos) and try to “] add /path/to/Compat@v1.0.1”, it should work the same way, right? In my tests I was only able to install the master branch even adding “@v1.0.1”.

On v0.6.x I used to change LOAD\_CACHE\_PATH. On v1.0.0 it seems that I can only change DEPOT\_PATH.  
So, first, is there a way to change the compiled packages path, regardless of the DEPOT\_PATH? Also, is DEPOT\_PATH supposed to work well in a shared environment. On some tests I was able to change groups and permissions for reading and it is working, but I wonder if it might break at some point if it’s not the default Julia way of handling the packages. The idea is that only me as admin will have write permission.

---

<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:** [August 29, 2018, 8:20pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249/2 "2018-08-29T20:20:07Z")

</div>

> [@madprogrammer](#):
>
> First of all, the new Pkg does not work with packages that aren’t git repositories, right? I used to download tar files (without .git folder) and manually add to PKGDIR on julia 0.6.x, but now I need to clone the repository.

This seems like a job for `dev` / `develop`. Put the files wherever you want, and then do

```julia
pkg> dev path/to/files

```

> [@madprogrammer](#):
>
> But what if I clone a repository (I need to use local repos) and try to “] add /path/to/Compat@v1.0.1”, it should work the same way, right? In my tests I was only able to install the master branch even adding “@v1.0.1”.

You can do the same as above, and `git checkout v1.0.1` in the folder that you `dev`d.

---

<div class="post-metadata">

**Author:** ![madprogrammer](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Post date:** [August 30, 2018, 1:09pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249/3 "2018-08-30T13:09:35Z")

</div>

Oh, that’s really useful! Thanks @fredrikekre

PS: Someone else has any ideas on the other questions?

---

<div class="post-metadata">

**Author:** ![madprogrammer](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Post date:** [August 30, 2018, 6:11pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249/4 "2018-08-30T18:11:02Z")

</div>

I could actually host my own registries making some patches on JuliaRegistries/General. Will Julia work with it, or does the General registries need to come from Github?

---

<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:** [August 30, 2018, 7:16pm UTC](https://discourse.julialang.org/t/new-pkg-local-packages-shared-depot/14249/5 "2018-08-30T19:16:26Z")

</div>

Yea you can have your own registry in `~/.julia/registries`.
