Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update all Chocolatey applications without confirmation?

Tags:

chocolatey

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?

like image 386
Josue Espinosa Avatar asked Apr 26 '15 03:04

Josue Espinosa


People also ask

How do I update all packages in Chocolatey?

To upgrade chocolatey, open command prompt as administrator and run choco upgrade chocolatey . c:\> choco upgrade chocolatey Chocolatey v0. 10.8 Upgrading the following packages: chocolatey By upgrading you accept licenses for the packages.

How do I update apps in Chocolatey?

Again, you need PowerShell open as Administrator. Then you can run the command choco upgrade malwarebytes. That will make Chocolatey go out and see if there's an update and then update it.

Does Chocolatey update automatically?

Automatic Updater (AU)The Chocolatey Automatic Package Updater Module is a PowerShell module which implements functions that can be used to automate Chocolatey package updates.

How to automatically update software with chocolatey?

If you’ve installed several packages with Chocolatey, you can update them all with a one-line command: choco upgrade all -y. That’s as hard as it gets. Now what we must do to automatically update software with Chocolatey is to somehow make that command run on a schedule. Automatically Update Software with Chocolatey

How do I upgrade to the latest version of chocolatey for Firefox?

Recommendation: You should run the regular choco install (without the skip powershell argument) for Firefox and allow Chocolatey to upgrade the installed version. Check the package files first to be sure it is the same type of install (native installer versus zip archives). You can download the package and review the install script.

How to update Malwarebytes on chocolatey?

That will make Chocolatey go out and see if there’s an update and then update it. We just installed Malwarebytes, so it will show that zero out one packages were updated. That’s okay. If you’ve installed several packages with Chocolatey, you can update them all with a one-line command: choco upgrade all -y. That’s as hard as it gets.

How can I prevent chocolatey GUI from checking for outdated packages?

By default, when Chocolatey GUI first opens it will check for all currently outdated packages based on the currently configured sources (this can be configured via the Prevent Automated Outdated Packages Check feature).


2 Answers

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.

like image 55
Jon Crowell Avatar answered Oct 19 '22 23:10

Jon Crowell


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).
like image 59
ferventcoder Avatar answered Oct 19 '22 23:10

ferventcoder