Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chocolatey list without version?

What is the secret flag to use for listing all Chocolatey install packages WITHOUT version (only package names) ? :)

choco list -l

Chocolatey v0.10.15 7zip 19.0 androidstudio 3.5.3.0

choco list -l 'secret flag ?'

Chocolatey 7zip androidstudio

like image 549
RePsEj Avatar asked Apr 23 '26 16:04

RePsEj


2 Answers

There is no secret flag - but just because there is an official one (at least since v0.10.6 https://github.com/chocolatey/choco/pull/1254 - see choco list -?):

 --idonly, --id-only
 Id Only - Only return Package Ids in the list results. Available in 0.1-
   0.6+.

I suppose you want that list to install the packages again somewhere else. So I also recommend adding -r to "get rid" of the additional output (header/footer):

-r, --limitoutput, --limit-output
 LimitOutput - Limit the output to essential information

The complete command will be choco list -l -r --id-only

like image 111
ComiR Avatar answered Apr 26 '26 05:04

ComiR


There isn't a secret flag to enable this.

Part of the value of a package manager is to know what package is installed, and also what version of the package is installed.

You could run the command:

choco list -l -r

Which would output the information in a slightly different format, including a | to separate the package name and version, which you could then parse separately and get only the package names.

like image 29
Gary Ewan Park Avatar answered Apr 26 '26 06:04

Gary Ewan Park