Calling clist -l
gives me a list of packages with versions:
7zip.install 16.04
ccleaner 5.28.6005
ConEmu 17.3.16.0
...
How do I ge
I would like to summarize the two general approaches given by other answers to this post.
1. Export a plain list of package names, and use it to build a cinst
command.
This is aligned with the question as asked: how to clist -l
without version information.
I like the simple answer of clist -l --idonly
, but to automate this, one must still account for the first and last lines. So, a simple script is probably necessary -- and on Windows, this is a bit of a pain (which is why this question is even being asked).
If the primary goal is to backup and re-install Choclatey packages, then there are some good choices without writing your own scripts. Hence the next type of solution...
2. Export a packages.config file, which can be installed by cinst
natively.
This is a nice way to do it, because installing a packages.config is natively supported by cinst.
Unfortunately, Chocolatey lacks native support for exporting packages.config.
Here are a few common ways to export packages.config:
For background to this approach, and to track progress of a built-in solution, see https://github.com/chocolatey/choco/issues/357.