# How to correctly update a package?

**URL:** <https://discourse.julialang.org/t/how-to-correctly-update-a-package/107730>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 17, 2023, 10:21am UTC](https://discourse.julialang.org/t/how-to-correctly-update-a-package/107730 "2023-12-17T10:21:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiang\_ming\_zhang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiang_ming_zhang/32/204063_2.png) [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Post date:** [December 17, 2023, 10:21am UTC](https://discourse.julialang.org/t/how-to-correctly-update-a-package/107730/1 "2023-12-17T10:21:17Z")

</div>

I had a directory downloaded from Github.

Previously, I can run the example codes in the directory. But yesterday, I noticed that they had a latest version of the package. So I updated the package

```julia
julia> using Pkg

julia> Pkg.update("name of the package")

```

But I then encountered a problem with their new example script. I got

```julia
ERROR: UndefVarError: `default_starting_vector` not defined
Stacktrace:
 [1] top-level scope
   @ c:\Users\jmzhang\Downloads\Rimu.jl-develop (2)\Rimu.jl-develop\scripts\BHM-example.jl:48

```

Here the new function is not recognized. What is the problem?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 17, 2023, 11:31am UTC](https://discourse.julialang.org/t/how-to-correctly-update-a-package/107730/2 "2023-12-17T11:31:28Z")

</div>

Which package? Which example script? Which Julia version are you using?

---

<div class="post-metadata">

**Author:** ![jiang\_ming\_zhang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiang_ming_zhang/32/204063_2.png) [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Post date:** [December 17, 2023, 1:07pm UTC](https://discourse.julialang.org/t/how-to-correctly-update-a-package/107730/3 "2023-12-17T13:07:38Z")

</div>

I guess I figured it out.

I shut down my vscode and then restarted it. Now it works.
