How do I update all Chocolatey applications without confirmation?

Chocolatey

Chocolatey Problem Overview


I used to be able to call cup all and have my applications update. Now, it asks for yes to ensure that I want to install the selected package. Is there a way I can have everything auto update without constantly typing yes for every update?

Chocolatey Solutions


Solution 1 - Chocolatey

As Rob points out, -y will skip the prompts for a given command.

If you'd rather not be bothered with confirmation prompts at all, you can set the option globally.

The following enables allowGlobalConfirmation, which will install or update without confirmation prompts.

choco feature enable -n=allowGlobalConfirmation

If you ever want to turn the prompts back on, run the same command with disable:

choco feature disable -n=allowGlobalConfirmation

This can be useful for unattended scripts without affecting the future state of the prompts.

NOTE: The syntax has recently changed (July 2016) and now requires an equals sign before allowGlobalConfirmation instead of a dash. Thanks for the heads up, @dragon788.

Solution 2 - Chocolatey

tl;dr - Yes, completely possible. Use cup all -y

Also check out the help menus now - choco -h, choco install -h

Longer answer, we've moved a little closer towards other package managers for security reasons, where by default we stop and confirm if you are okay with the state change. I always communicate changes in the release notes / changelog, which also end up in the nuspec file, so I highly recommend folks scan at least one of those to see anything tagged breaking changes. Always scan from your current version up to the one you are upgrading to so that you catch all changes.

The one that is the most important right now is the x.y.z release (in this case 0.9.9), once we reach v1 we will be fully SemVer compliant and breaking changes will constitute a major version bump (we're still semver in a less than v1), so you can scan breaking changes and major new features in an x release, new compatible features in a .y release, and .z releases will only contain compatible fixes for the current release.

0.9.9 introduced a new compiled client that was/is a total rewrite. 0.9.10 will have complete feature parity with the older client - see FeatureParity. Why the rewrite? For a more maintainable, faster client that can run on mono now, so you are not completely tied to Windows. We've started adding support for other install providers (like Scriptcs).

The relevant bits of the release notes for your question:

  • [Security] Prompt for confirmation: For security reasons, we now stop for confirmation before changing the state of the system on most commands. You can pass -y to confirm any prompts or set a value in the config that will globally confirm and behave like older versions of Chocolatey (allowGlobalConfirmation, see choco feature -h for how to enable).
Categories
Recommended Chocolatey Solutions

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJosue EspinosaView Question on Stackoverflow
Solution 1 - ChocolateyJon CrowellView Answer on Stackoverflow
Solution 2 - ChocolateyferventcoderView Answer on Stackoverflow