Find where a package comes from

pkg> status shows that I have the Symbolics package added to my project.

I wanted to check if it’s the old one ( or the new one (

What’s the simplest way to do that? I looked for a pkg command such as info Symbolics or show Symbolics but didn’t find anything.

You can check the UUIDs in the respective Project.toml files against the output of Base.identify_package("Symbolics")

1 Like

I have

julia> Base.identify_package("Symbolics")
Symbolics [0c5d862f-8b57-4792-8d23-62f2024744c7]


shell> cat Project.toml
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"

but that doesn’t say where the Symbolics package comes from…

What I meant is to check against this:

So it seems you have the new package.

Actually, I just realized that I don’t think Mason’s package was ever registered, so if you did pkg> add Symbolics it can only be the new one.

1 Like

Ah OK that makes sense. It’s a bit cumbersome but it works if you know where to look (i.e. you have a guess for the repository URL)…

But then what if you have no prior idea where the package might come from? :slight_smile:

Pkg.status("Symbolics") should tell you where it comes from if it’s not straight out of the registry. E.g. I have

julia> Pkg.status("LongestPaths")
Status `~/.julia/environments/v1.5/Project.toml`
  [3a25c17e] LongestPaths v0.2.0 ``

julia> Pkg.status("YAML")
Status `~/.julia/environments/v1.5/Project.toml`
  [ddb6d928] YAML v0.4.5

where the latter is from the registry.

1 Like

Right, then if it does come from the registry I can go to GitHub - JuliaRegistries/General: The official registry of general Julia packages, navigate to the package directory and find the repo entry in the Project.toml.

The registry URL itself can be found with pkg> registry status.

More cumbersome than expected but I think it covers all cases :slight_smile: