# Pkg operations without updating registry

**URL:** <https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151>\
**Category:** General Usage\
**Created:** [February 4, 2020, 9:24am UTC](https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151 "2020-02-04T09:24:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [February 4, 2020, 9:24am UTC](https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151/1 "2020-02-04T09:24:23Z")

</div>

Is it possibly to run Pkg operations like `add` and `instantiate` without updating the registry? Since my registry is on NFS, updating it is slow, and having it update every few minutes when doing a lot of package operations and experimentation (switching versions, adding packages that are already available in my depot, trying different manifests) is a real nuisance. Cutting the internet connection works, but that’s not really an option. 😉

---

<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:** [February 4, 2020, 9:29am UTC](https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151/2 "2020-02-04T09:29:11Z")

</div>

There is a PR for an “offline mode”: [https://github.com/JuliaLang/Pkg.jl/pull/1265](https://github.com/JuliaLang/Pkg.jl/pull/1265) but needs to be updated for the new artifact system etc.

Edit:  
Sorry I misread, you just don’t want to update the registry.

1. You can delete the `.git` folder inside the registry to stop it from updating, but then you have to remember to manually update when you need/want to.
2. You can set `Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true`.
3. You can use [GitHub - fredrikekre/jlpkg: A command line interface (CLI) for Pkg, Julia's package manager.](https://github.com/fredrikekre/jlpkg) where option 2 is default. E.g. `$ jlpkg add Example` would not update the registry.

Note also that on Julia 1.5 (and also Julia 1.4 if you set `JULIA_PKG_SERVER="pkg.julialang.org"`) Pkg will just download the registry without using git, so that should also help.

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [February 4, 2020, 9:39am UTC](https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151/5 "2020-02-04T09:39:17Z")

</div>

`Pkg.UPDATED_REGISTRY_THIS_SESSION` should do the trick, thanks!

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [February 4, 2020, 9:47am UTC](https://discourse.julialang.org/t/pkg-operations-without-updating-registry/34151/6 "2020-02-04T09:47:48Z")

</div>

> [@fredrikekre](#):
>
> There is a PR for an “offline mode”

That would come in so handy in large-scale installations with networked/cluster storage!
