# Is there a way to prevent Julia from updating the registries almost every time?

**URL:** https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150
**Category:** Package Management
**Tags:** git, update
**Created:** [July 6, 2021, 2:31pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150 "2021-07-06T14:31:54Z")
**Posts on this page:** 9
**Page:** 3

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [July 8, 2021, 2:17pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/41 "2021-07-08T14:17:13Z")

</div>

On Windows 10 it is possible to speed up the registry download by adding the .julia folder to the anti virus exclusion list: [Why is the update of the registries so slow? - #11 by PetrKryslUCSD](https://discourse.julialang.org/t/why-is-the-update-of-the-registries-so-slow/28659/11).

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [July 8, 2021, 2:31pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/42 "2021-07-08T14:31:51Z")

</div>

> [@GunnarFarneback](#):
>
> e.g. `pkg> registry rm General` .

But if we do that Julia versions lower than 1.7 won’t work since they don’t know about the tared registry, right?

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [July 8, 2021, 2:34pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/43 "2021-07-08T14:34:56Z")

</div>

They don’t know about it, ignore it, and download registries the way they are used to. See [Read the registry straight from the tarball by KristofferC · Pull Request #2431 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/pull/2431#issuecomment-857866666).

---

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [July 8, 2021, 2:49pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/44 "2021-07-08T14:49:11Z")

</div>

> [@StefanKarpinski](#):
>
> Yikes. The things they call file systems these days.

Well, [glusterfs](https://www.gluster.org/) has a lot of great things going for it. But it is slow when it comes to stat (listing files) or deleting things. Basically it’s got to maintain its redundant synchronization between the servers, and that takes overhead. It does seem like the stats are cached so the second time I traverse a filesystem tree it’s fast… but that first time is potentially really slow.

---

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [July 8, 2021, 4:02pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/45 "2021-07-08T16:02:59Z")

</div>

For reference. I did download 1.7 beta, and did

```julia
] registry rm General

```

which took maybe an hour or so, and then

```julia
] registry add General

```

which took maybe 1 second 😉

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [July 8, 2021, 6:14pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/46 "2021-07-08T18:14:37Z")

</div>

That’s great to hear! Lots of slow burn work went into making that happen 😄 and the diff functionality will make this even better.

---

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [July 8, 2021, 6:16pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/47 "2021-07-08T18:16:22Z")

</div>

You guys are amazing. I can’t express how fortunate I feel to have Julia. I donate to you guys every year because you are doing “gods work” so to speak. I only wish I had more time to use the dang thing in between walking my rescue dog, feeding my kids, and avoiding COVID. (but hey, when I do sit down and have time to work on a project, I really appreciate that adding a package doesn’t take 2.5 hours)

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [July 8, 2021, 6:39pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/48 "2021-07-08T18:39:59Z")

</div>

> [@dlakelan](#):
>
> For reference. I did download 1.7 beta, and did
> 
> ```julia
> ] registry rm General
> 
> ```
> 
> which took maybe an hour or so, and then
> 
> ```julia
> ] registry add General
> 
> ```
> 
> which took maybe 1 second

I did the same and second step took a couple seconds but the first one was very quick too (Windows here).

---

<div class="post-metadata">

### Author: ![HanD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hand/32/213908_2.png) [@HanD](https://discourse.julialang.org/u/HanD)
#### Post date: [August 2, 2021, 7:17am UTC](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150/49 "2021-08-02T07:17:43Z")

</div>

> [@HanD](#):
>
> > [@jdad](#):
> >
> > Just a further comment about size of registry transfers. You are talking about hundred of megabytes, which hints me that it is a Git tar that is downloaded (with 1.7, the tar is only 3MB). If you are on 1.6, you could try to change registry type by `registry rm General / registry add General` which should change the transfer to tar of data only, if I am not mistaken.
> 
> Thanks, @jdad, My registry copy was inherited from Julia v1.0, I wasn’t aware that this could cause an issue. I tried what you suggested, and I will check the network usage for future registry updates.

Sooo, I’m still unsure what the removal and the re-adding of the General registry exactly did to my local copy, but the above trick did indeed solve the issue. And not only it reduced the network usage from 100 MB per update to approx. 3 MB, it also significantly improved the update time.

(Note that I’m still running Julia 1.6.2, so it is surely not the mentioned unpacked storage of the registry.)

[Previous page](https://discourse.julialang.org/t/is-there-a-way-to-prevent-julia-from-updating-the-registries-almost-every-time/64150.md?page=2)
