[UPDATE: 29-Dec-2013] Thanks to the comment by dataCore, I have added an even shorter version of the command to this post.
This post will be short and sweet. I have found myself constantly forgetting how to list all the Chocolatey packages I have installed on a machine and find myself, once again, searching the web for the answer. The command is really quite simple (and obvious) and I’m not sure why I can’t seem to remember it. Anyway, here it is in all its glory!
chocolatey list -localonly
chocolatey list -lo
or (even shorter, thanks to dataCore for this option in the comments)
I found the answer on the chocolatey github repo:
A final note: If you work in a Windows environment and haven’t heard of or used Chocolatey you should really check it out. It allows you to install common windows programs via the command line. This of course means you can automate! I’m currently working on a script to automate the set-up of a new developer machine and Chocolatey is a key ingredient. I plan to blog on my solution once it is ironed out.
But where will the “allready installed packages” be saved? Is there some sort of *.config with all installed packages?
Thanks for the short-cut command!
When installing a package you can choose between a “installable” and “portable” application. An installable application is installed wherever the applications installation file wants to be installed by default. A portable application is installed to a “lib” folder in the chocolatey installation folder, which is added as a system variable named %ChocolateyInstall%. At the command prompt you can just type “set” and it will list all your environment variables. By default the %ChocolateyInstall% folder is c:\chocolatey.
For more information on this, check out the FAQ page on the chocolatey site. There are two questions here of particular interest to your question, “What distinction does chocolatey make between an installable and a portable application?” and “What is the difference between packages named *.install (i. e. git.install), *.portable (i. e. git.portable) and * (i. e. git)?”. Also, there is a page discussing the why Chocolatey installs where it does, check it out here.
I hope this helps. If I completely missed the mark with your question, please let me know.
Don Heuvelman said:
Thanks for this awesome short blogpost. Helped me out while searching for this option in Chocolatey!
Thanks for that specific hint!
Unfortunately, one of the most expected feature in chocolatey “–installdirectory” (to set the target installation path) is only available in the pay version, actually 96$ / year.
IMHO that’s a no-go for every personal use!
I don’t want to use the default target directories, I have my own structure.
There seems to be something like –installargs, but they are much too complicated for beginners.
Geo B said:
You mentioned, “I plan to blog on my solution once it is ironed out.”
… did you ever do this? … I’m curious what your final install suite (as a dev) was … ☺
Chocolatey is utter crap.
Even now nearly 10 years after this article was written, typing `choco –help` doesn’t even mention the `list` command or its options, or any other useful commands for that matter.