# How can I know the uuid of a registered package?

**URL:** https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081
**Category:** General Usage
**Tags:** pkg
**Created:** [August 26, 2018, 11:28am UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081 "2018-08-26T11:28:23Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Diego\_Javier\_Zea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/diego_javier_zea/32/1858_2.png) [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)
#### Post date: [August 26, 2018, 11:28am UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/1 "2018-08-26T11:28:23Z")

</div>

I wanted to know the uuid for of a registered package for using Requires.jl in Julia 0.7.

I found the uuid looking into the `Package.toml` file of the package in [GitHub - JuliaRegistries/General: The official registry of general Julia packages](https://github.com/JuliaRegistries/General)

But, Is there an easy way to know the uuid of a registered package from Julia’s REPL?

Cheers,

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [August 26, 2018, 12:03pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/2 "2018-08-26T12:03:43Z")

</div>

My understanding is that uuids are not yet generated, thus you cannot use them at the moment. You should use the old workflow.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [August 26, 2018, 12:27pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/3 "2018-08-26T12:27:01Z")

</div>

The simples way is probably to `add Package` and then look in `Project.toml`. In the future you can just look in the packages `Project.toml`.

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [August 26, 2018, 12:30pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/4 "2018-08-26T12:30:20Z")

</div>

Using the github file finder makes it pretty quick:

> **[File Finder · JuliaRegistries/General](https://github.com/JuliaRegistries/General/find/master)**
>
> The official registry of general Julia packages. Contribute to JuliaRegistries/General development by creating an account on GitHub.

But I was also looking for a command to shorten that step further, like:

```julia
(v0.7) pkg> uuid Requires

```

---

<div class="post-metadata">

### Author: ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)
#### Post date: [August 26, 2018, 5:56pm UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/5 "2018-08-26T17:56:23Z")

</div>

This might be useful (returns a string, from your local copy of the registry), if you don’t mind depending on internals that may change:

```julia
function registereduuid(name)
    initial = SubString(name, 1:1)
    for d in Pkg.Types.registries()
        r = joinpath(d, initial, name, "Package.toml")
        if isfile(r)
            p = Pkg.TOML.parsefile(r)
            return get(p, "uuid", nothing)
        end
    end
    nothing
end

```

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [August 27, 2018, 4:09am UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/6 "2018-08-27T04:09:55Z")

</div>

it would be good to get something like that into Pkg.jl so they can deal with those changing internals at the source

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [August 27, 2018, 11:25am UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/7 "2018-08-27T11:25:49Z")

</div>

Check the UUID in `~/.julia/environments/1.0/Manifest.toml`, any package or dependency you added should show up here.

> [@Raf](#):
>
> it would be good to get something like that into Pkg.jl so they can deal with those changing internals at the source

Hmm, well I could add this feature to my pull request for the `Pkg` search, which can already find lots of info about packages. It already does the opposite, such as telling you the name of a package given a UUID.

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [August 28, 2018, 5:03am UTC](https://discourse.julialang.org/t/how-can-i-know-the-uuid-of-a-registered-package/14081/8 "2018-08-28T05:03:51Z")

</div>

That would be great. Manifest.toml doesn’t contain packages that aren’t on your system, so isn’t the complete solution - especially because Requires specifies which packages you _don’t need_ in your system!
