# Pkg.update() does not update, but Pkg.add() does

**URL:** https://discourse.julialang.org/t/pkg-update-does-not-update-but-pkg-add-does/68877
**Category:** General Usage
**Tags:** package-manager
**Created:** [September 28, 2021, 1:57pm UTC](https://discourse.julialang.org/t/pkg-update-does-not-update-but-pkg-add-does/68877 "2021-09-28T13:57:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)
#### Post date: [September 28, 2021, 1:57pm UTC](https://discourse.julialang.org/t/pkg-update-does-not-update-but-pkg-add-does/68877/1 "2021-09-28T13:57:32Z")

</div>

I recently released a patch update of a registered package (say `PackageA`). The version number increased from 0.3.1 to 0.3.2.

On a different computer, I installed `PackageB` that depends on `PackageA`. `PackageA` was not installed on this computer directly, but installed recursively via installing `PackageB`. In other words, I had something like

```julia-repl
pkg> st PackageA
    No Matches in `~/.julia/environments/v1.6/Project.toml`

pkg> st -m PackageA
    PackageA v0.3.1

```

At this point, I thought if I do `pkg> up`, then `PackageA` would be updated to the patch release (v0.3.2), but it didn’t. When last time a similar phenomenon happened, I found that the patch release had a conflict dependency with other packages, so I expected this time the reason would be similar. The conflicting dependency could be revealed in the error message that showed up by forcing to install the patch release of `PackageA`. However, this time forcing to install the patch release by `pkg> add PackageA@0.3.2` just succeeded without any errors, which means that the patch release didn’t have any conflicting dependency.

Is this something expected? In other words, should we expect that `pkg> up` does not always update the packages recursively installed via other packages to the latest versions, even if the latest versions do not have any conflicting dependencies?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [September 28, 2021, 2:05pm UTC](https://discourse.julialang.org/t/pkg-update-does-not-update-but-pkg-add-does/68877/2 "2021-09-28T14:05:45Z")

</div>

Check with 1.7, the resolver was improved.
