# What's the \`Pkg\` equivalent of \`pin Pkg1@0.5.0\`?

**URL:** <https://discourse.julialang.org/t/whats-the-pkg-equivalent-of-pin-pkg1-0-5-0/30879>\
**Category:** New to Julia\
**Created:** [November 9, 2019, 4:45am UTC](https://discourse.julialang.org/t/whats-the-pkg-equivalent-of-pin-pkg1-0-5-0/30879 "2019-11-09T04:45:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [November 9, 2019, 4:45am UTC](https://discourse.julialang.org/t/whats-the-pkg-equivalent-of-pin-pkg1-0-5-0/30879/1 "2019-11-09T04:45:16Z")

</div>

I can do `Pkg.add("Pkg1")` which is the same as `]add Pkg1`.

What’s the equivalent of `]pin Pkg1@0.5.0`? I can’t run this in Jupyter notebook.

I tried `Pkg.pin("Pkg1", v"0.50")` but it doesn’t have this signature.

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [November 9, 2019, 4:51am UTC](https://discourse.julialang.org/t/whats-the-pkg-equivalent-of-pin-pkg1-0-5-0/30879/2 "2019-11-09T04:51:36Z")

</div>

From running

```julia
using Pkg
?Pkg.pin

```

I get the example:

```julia

Pkg.pin(PackageSpec(name="Example", version="0.3.1"))

```

Is that not working for you?

Of course, in your example it would be

```julia
Pkg.pin(PackageSpec(name="Pkg1", version="0.50"))

```
