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>

To remove a pinned package use:

choco pin remove --name <package name>

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,package2"

Deixe uma resposta

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