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 get this list without version information?
My intention is to use this output to call choco install 7zip.install ccleaner ConEmu ...
on another machine. An alternative answer could be how to use the output of clist
directly into cinst
.
Packages are installed in C:\ProgramData\chocolatey\lib (or in $env:ChocolateyInstall ). See what is in there.
Chocolatey packages are installed to ChocolateyInstall\lib , but the software could go to various locations, depending on how the package maintainer created the package. Some packages are installed under ChocolateyInstall\lib , others - especially packages that are based on Windows installers (.
Go to https://community.chocolatey.org/packages/chocolatey and find a version you want. Click on Download to download that version's nupkg file.
Chocolatey or Choco as it is sometimes referred to, is a free, open-source package manager for Windows that is very similar to Apt or DNF in the Linux realm. In other words, this is a program used for installing software via the Windows command line.
If you have a look at the help information for the choco install
command (you can do this using choco install -h
, you will find the following usage:
cinst <pkg|packages.config> [<pkg2> <pkgN>] [<options/switches>]
As you will see, it is possible to pass a packages.config file, which would contain all the packages that you want to install. The format of this packages.config file is very simple and looks like the following:
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="calibre" version="2.81.0" /> <package id="chocolatey" version="0.10.3" /> <package id="chocolatey.extension" version="1.9.6" /> <package id="chocolatey-core.extension" version="1.1.0" /> </packages>
Once you have this file, installing all the packages again on another machine is a simple one line command.
A simple way to generate this packages.config file would be to install ChocolateyGUI (choco install chocolateygui
), which includes an option to export the currently installed list of applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With