# Get url of package

**URL:** <https://discourse.julialang.org/t/get-url-of-package/4212>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 11, 2017, 6:21pm UTC](https://discourse.julialang.org/t/get-url-of-package/4212 "2017-06-11T18:21:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [June 11, 2017, 6:21pm UTC](https://discourse.julialang.org/t/get-url-of-package/4212/1 "2017-06-11T18:21:10Z")

</div>

I have the name of a registered package and I want to get its url. Currently I use the following hack:

```julia
function url(pkg)
    path = joinpath(Pkg.dir(), "METADATA", pkg, "url")
    strip(readstring(path))
end

```

is there a better way?

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [June 12, 2017, 4:29am UTC](https://discourse.julialang.org/t/get-url-of-package/4212/2 "2017-06-12T04:29:41Z")

</div>

What is the issue with this solution? I used the same code to retrieve the URL: [https://github.com/JuliaGraphs/JuliaGraphsTutorials/blob/master/DAG-Julia-Pkgs.ipynb](https://github.com/JuliaGraphs/JuliaGraphsTutorials/blob/master/DAG-Julia-Pkgs.ipynb)

and plot data for all registered packages:

- [https://juliohm.github.io/science/DAG-of-Julia-packages/](https://juliohm.github.io/science/DAG-of-Julia-packages/)
- [https://juliohm.github.io/science/where-are-the-julians/](https://juliohm.github.io/science/where-are-the-julians/)

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [June 12, 2017, 6:49am UTC](https://discourse.julialang.org/t/get-url-of-package/4212/3 "2017-06-12T06:49:38Z")

</div>

`Pkg.Read.url` does pretty much exactly that

---

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [June 12, 2017, 5:20pm UTC](https://discourse.julialang.org/t/get-url-of-package/4212/4 "2017-06-12T17:20:58Z")

</div>

My function

- felt like something that is probably already implemented somewhere
- uses implementation details of the package manager

---

<div class="post-metadata">

**Author:** ![AtsushiSakai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atsushisakai/32/6559_2.png) [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Post date:** [April 3, 2021, 2:58pm UTC](https://discourse.julialang.org/t/get-url-of-package/4212/5 "2021-04-03T14:58:55Z")

</div>

I think `Pkg.Read.url` does not exist in Julia v1.6…

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [April 3, 2021, 5:56pm UTC](https://discourse.julialang.org/t/get-url-of-package/4212/6 "2021-04-03T17:56:19Z")

</div>

That is a correct observation. This question and answer is almost four years old and were given for an obsolete major version of Julia, probably 0.5, and the package manager was completely rewritten for Julia 1.0.

If you have a question it is better to start a new post rather than reviving a years old thread.
