# How to know why a Julia package is downgraded?

**URL:** <https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163>\
**Category:** New to Julia\
**Created:** [January 9, 2020, 4:09pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163 "2020-01-09T16:09:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [January 9, 2020, 4:09pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/1 "2020-01-09T16:09:31Z")

</div>

Sometimes packages seem to be randomly downgraded while update is run:

```julia
(v1.3) pkg> update
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.3/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [b552c78f] ↓ DiffRules v1.0.0 ⇒ v0.1.0

```

At the same time DiffRules 0.1.0 is not a strict dependency:

```julia
add DiffRules@1
 Resolving package versions...
  Updating `~/.julia/environments/v1.3/Project.toml`
  [b552c78f] + DiffRules v1.0.0
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [b552c78f] ↑ DiffRules v0.1.0 ⇒ v1.0.0

```

How do I know why the package is downgraded and what package requires DiffRules 0.1.0 but not 1.0? Shouldn’t the latest be installed automatically?

---

<div class="post-metadata">

**Author:** ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Post date:** [January 9, 2020, 4:31pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/2 "2020-01-09T16:31:24Z")

</div>

Mostly it is because compat bounds of the packages that you have are old.

So Pkg manager downgrades one specific package so all the packages use compatible compat bounds.

This is also an issue with Flux. Colors compat bounds are old, but there are other packages that use newer Colors. This is when Pkg downgrades for example Flux to a point that it didn’t have any restriction or it was more relaxed.  
[https://github.com/FluxML/Flux.jl/pull/984](https://github.com/FluxML/Flux.jl/pull/984)

If everyone use CompatHelper, and not to remove the support for older versions of a package for no reason, this issue gets resolved

You can also have different folders on your system, and `activate` there to keep separate environments that don’t clash with each other.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [January 9, 2020, 4:42pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/3 "2020-01-09T16:42:04Z")

</div>

You can find reverse dependencies in Julia Observer (look at the pane “Used by”):  
[https://www.juliaobserver.com/packages/DiffRules](https://www.juliaobserver.com/packages/DiffRules)

It seems that packages marked in italics are reverse dependencies, so you can check which ones are in your environment.

---

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [January 9, 2020, 6:40pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/4 "2020-01-09T18:40:48Z")

</div>

But wouldn’t a compatibility error be cast if I tried to install a version outside compat bounds?

---

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [January 9, 2020, 6:41pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/5 "2020-01-09T18:41:37Z")

</div>

Deps are also listed in the manifest, but the versions are not there.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [January 9, 2020, 8:56pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163/6 "2020-01-09T20:56:37Z")

</div>

Yes, sure. The advantage of Julia Observer is that it gives you the list of _reverse_ dependencies, so that you don’t have to go through the manifest file and look for packages that have the downgraded one among its deps (in this case DiffRules).

Regarding the version number, you can go to your local registry (`.julia/registries` etc.), and look into the `Compat.toml` file of the packages that depend on the one that was downgraded. It should be possible to create a script that does that search and tells you what packages are setting the upper compat limit.
