# Unintuitive behavior of package update with --fixed

**URL:** <https://discourse.julialang.org/t/unintuitive-behavior-of-package-update-with-fixed/32855>\
**Category:** General Usage\
**Tags:** package-manager\
**Created:** [January 1, 2020, 9:07pm UTC](https://discourse.julialang.org/t/unintuitive-behavior-of-package-update-with-fixed/32855 "2020-01-01T21:07:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bicycle1885](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicycle1885/32/107_2.png) [@bicycle1885](https://discourse.julialang.org/u/bicycle1885)\
**Post date:** [January 1, 2020, 9:07pm UTC](https://discourse.julialang.org/t/unintuitive-behavior-of-package-update-with-fixed/32855/1 "2020-01-01T21:07:18Z")

</div>

Hi,

I found a weird behavior of the `update` command in Pkg.jl, which looks a bug to me. But I’m not perfectly sure so let me ask here before filing an issue on the repository.

Imagine a situation where you have DataStructures.jl v0.17.5 and Example.jl v0.5.1 installed. Both packages are independent of each other and have newer versions now, so running `update` without any options updates both packages to the latest versions.

The `update` command has the `--fixed` option, which is explained as “if the --fixed upgrade level is given, then the following packages will not be upgraded at all.” My understanding from this description is that if you run `update --fixed X Y Z` all installed packages except for X, Y, and Z will be updated to the latest compatible versions. However, in the situation above, running `update --fixed Example` didn’t update DateStructures.jl to the latest version:

```julia
(v1.3) pkg> st
    Status `~/.julia/environments/v1.3/Project.toml`
  [864edb3b] DataStructures v0.17.5
  [7876af07] Example v0.5.1

(v1.3) pkg> up --fixed Example
  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`
 [no changes]

```

Of course, just running `update` updated both packages as expected:

```julia
(v1.3) pkg> st
    Status `~/.julia/environments/v1.3/Project.toml`
  [864edb3b] DataStructures v0.17.5
  [7876af07] Example v0.5.1

(v1.3) pkg> up
  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`
  [864edb3b] ↑ DataStructures v0.17.5 ⇒ v0.17.6
  [7876af07] ↑ Example v0.5.1 ⇒ v0.5.3
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [864edb3b] ↑ DataStructures v0.17.5 ⇒ v0.17.6
  [7876af07] ↑ Example v0.5.1 ⇒ v0.5.3

julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 5 2400G with Radeon Vega Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, znver1)
Environment:
  JULIA_PROJECT = @.

```

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [January 1, 2020, 11:18pm UTC](https://discourse.julialang.org/t/unintuitive-behavior-of-package-update-with-fixed/32855/2 "2020-01-01T23:18:52Z")

</div>

You are correct in your analysis, this is a bug. Thanks for pointing it out!

I have a WIP bugfix: [https://github.com/JuliaLang/Pkg.jl/pull/1576](https://github.com/JuliaLang/Pkg.jl/pull/1576).

---

<div class="post-metadata">

**Author:** ![bicycle1885](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicycle1885/32/107_2.png) [@bicycle1885](https://discourse.julialang.org/u/bicycle1885)\
**Post date:** [January 1, 2020, 11:39pm UTC](https://discourse.julialang.org/t/unintuitive-behavior-of-package-update-with-fixed/32855/3 "2020-01-01T23:39:37Z")

</div>

Great! Thank you for explaining and fixing it.

Can I ask you a related question here?  
If `--fixed` is called without package arguments, what would be the expected behavior?  
Perhaps `update --fixed` is equivalent to `update` since no packages are fixed?
