# Pkg version list?

**URL:** <https://discourse.julialang.org/t/pkg-version-list/1257>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [January 3, 2017, 9:05am UTC](https://discourse.julialang.org/t/pkg-version-list/1257 "2017-01-03T09:05:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Post date:** [January 3, 2017, 9:05am UTC](https://discourse.julialang.org/t/pkg-version-list/1257/1 "2017-01-03T09:05:46Z")

</div>

Is there a way to get a list of available versions of a package?

I’m trying to get ahead on updating my code for Julia 0.6 but a package my code depends on, DataFrames, doesn’t work in 0.6 when I simply use `Pkg.add`; it fails on percompilation. I’ve checked the DataFrames Github page but it wasn’t clear to me if there was a working version for 0.6.

> Julia Version 0.6.0-dev.1843  
> Commit c38a5a3 (2017-01-01 14:09 UTC)  
> Platform Info:  
> OS: Linux (x86\_64-pc-linux-gnu)  
> CPU: Intel(R) Core™ i5-4570 CPU @ 3.20GHz  
> WORD\_SIZE: 64  
> BLAS: libopenblas (USE64BITINT DYNAMIC\_ARCH NO\_AFFINITY Haswell)  
> LAPACK: libopenblas64\_  
> LIBM: libopenlibm  
> LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

> DataFrames 0.8.5

---

<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:** [January 3, 2017, 12:10pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/2 "2017-01-03T12:10:02Z")

</div>

You can use Git for a hacked solution:

```bash
cd ~/.julia/v0.5/DataFrames
git tag --list v*

```

and you can run these commands from Julia too:

```julia
cd(Pkg.dir("DataFrames"))
versions = split(readstring(`git tag --list v*`), '\n')

```

---

<div class="post-metadata">

**Author:** ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Post date:** [January 3, 2017, 12:17pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/3 "2017-01-03T12:17:39Z")

</div>

Nice to know. Unfortunately there’s no context to the version, which one works in 0.6? 0.5? etc

---

<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:** [January 3, 2017, 12:21pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/4 "2017-01-03T12:21:40Z")

</div>

In that case, I don’t see other solution other than inspecting the REQUIRE file for each version tag. If you add `DataFrames` in `Julia v0.6` and it fails saying that there is no support for that version, then you have to wait for a new release of `DataFrames`.

---

<div class="post-metadata">

**Author:** ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Post date:** [January 3, 2017, 12:28pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/5 "2017-01-03T12:28:52Z")

</div>

How do you list versions not in the master branch?

---

<div class="post-metadata">

**Author:** ![Simon\_Bolland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simon_bolland/32/8920_2.png) [@Simon\_Bolland](https://discourse.julialang.org/u/Simon_Bolland)\
**Post date:** [January 3, 2017, 1:19pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/6 "2017-01-03T13:19:47Z")

</div>

Unhacked version:

> Pkg.available(“DataFrames”)

---

<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:** [January 3, 2017, 2:06pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/7 "2017-01-03T14:06:45Z")

</div>

Added to the list 🙂

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 21, 2022, 1:36pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/8 "2022-02-21T13:36:05Z")

</div>

`Pkg.available` is not available 😛 in 1.7.2, is there a new method for that?

---

<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:** [February 21, 2022, 2:18pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/9 "2022-02-21T14:18:54Z")

</div>

A slight modification of [Reading versions of a package from unpacked registry tarball - #2 by GunnarFarneback](https://discourse.julialang.org/t/reading-versions-of-a-package-from-unpacked-registry-tarball/76829/2) should give you a list of versions. But if you want it in the context of versions of some package you have as a dependency, [PackageCompatUI](https://github.com/GunnarFarneback/PackageCompatUI.jl) is a more convenient tool.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 21, 2022, 2:28pm UTC](https://discourse.julialang.org/t/pkg-version-list/1257/10 "2022-02-21T14:28:01Z")

</div>

Indeed, thank you!

```julia
function available_versions(pkgname::AbstractString)
    registry = only(filter(r -> r.name == "General", Pkg.Registry.reachable_registries()))
    pkg = only(filter(pkg -> pkg.name == pkgname, collect(values(registry.pkgs))))
    return keys(Pkg.Registry.registry_info(pkg).version_info)
end

```
