How to update all Chocolatey packages except one

To update all packages installed with Chocolatey use:

choco upgrade all -y

To prevent Chocolatey to update one or more specific packages, we can pin a given package to a specific version. To do so, use:

choco pin add -n <package name> --version <version>

If you wanna to update the package afterwards, you will have to remove the pinned package. To do so, run the following command:

choco pin remove --name <package name>

Then you can run the following command to update the package to a specific version:

choco update <package name> --version=<VALUE>

Alternatively, it is possible to use the “–except” switch to ignore some specific packages. To do so, use the following command:

choco upgrade all -Y --except="package1,pa=ckage2"

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *