How do I get the list of all the versions of a package?
Asked Answered
N

3

40

I would like to get the list of versions of a package. What is the command line for this?

It would be also nice to search in versions, for example: all the versions that are higher or lower than a specific version.

Nitrogen answered 3/11, 2014 at 7:17 Comment(0)
R
59

Update: Since v2.0.0 of chocolatey the command is

 choco search --exact <packagename> --all

(Credit: Podbrushkin's comment https://mcmap.net/q/396132/-how-do-i-get-the-list-of-all-the-versions-of-a-package)

For versions prior to v2.0.0, you can just add the --all to the end of your request. You can also add -v for verbose output.

Choco list packagename --all

Revkah answered 3/11, 2014 at 19:45 Comment(7)
Thanks for sharing! I was also trying to find this switch.Indented
This does not list pre releases or release candidates. How would you list these?Maze
@AlexanderRyanBaggett --pre - chocolatey.org/docs/commands-listRevkah
this is returning a list of packages that are beyond my packagenameSam
You can now use -e as mentioned in another post. I'll update this answer to cover that.Revkah
It doesn't work for me. For instance: choco list dotnet -e --all only shows Chocolatey v0.10.15 dotnet 5.0.4 [Approved] 1 packages found. but not the other available versions (like 5.0.0).Repulse
This is a known issue with choco CLI v0.10.15. It is fixed with a beta prerelease available.Revkah
L
19

Update: Since v2.0.0 of chocolatey the command is

choco search -e <package> -a

(Credit: Podbrushkin's comment https://mcmap.net/q/396132/-how-do-i-get-the-list-of-all-the-versions-of-a-package)

For versions prior to v2.0.0 it was:

choco list -e <package> -a

-e, --exact

Only return packages with this exact name.

choco list --by-id-only [package] -a

--by-id-only

Only return packages where the id contains the search filter.

Lefler answered 10/4, 2019 at 3:16 Comment(0)
A
8

Now it's choco search -e packagename -a.

-e is for "exact name", -a is for "all".

Old methods don't work anymore:

PS C:\Users\user> choco list -e python -a
Chocolatey v2.2.2
Invalid argument -a. This argument has been removed from the list command and cannot be used.
PS C:\Users\user> Choco list python --all
Chocolatey v2.2.2
Invalid argument --all. This argument has been removed from the list command and cannot be used.
Adjudge answered 31/10, 2023 at 7:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.