63

There is Ketarin to update Chocolatey packages and push them to chocolatey.org automatically, but how do I automatically update all locally installed Chocolatey packages?

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
030
  • 8,013
  • 8
  • 63
  • 100

6 Answers6

93

Try choco upgrade all -y (or cup all -y). One can create a scheduled task to run in the evenings that would do this.

ferventcoder
  • 10,640
  • 2
  • 51
  • 83
15

Update - Sept 2018

As well as choco-upgrade-all-at-startup to upgrade all packages on startup (mentioned above), there is also now a Chocolatey package, choco-upgrade-all-at, that can be used to check/upgrade all packages as often (for example, daily, weekly..) as you require, at a time that suits :-)

A downside of using the public repository of course is that you are dependent on other people to maintain the packages largely out of the goodness of their hearts, so you should probably still run something like SUMo once in a while to keep an eye on things if you are using this to keep your own machines up-to-date. Organisations are strongly encouraged to host and maintain their own repository rather than use the public one for this reason.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Sorren69
  • 151
  • 1
  • 2
4

Note: this answer was relevant for some quite old version of Chocolatey (0.9.8 and older).

You should be aware that Chocolatey in fact doesn't update already installed packages (neither cup all or cup <package>), but rather installs a newer version(s) beside older one(s). So you'll end up with a stack of previously installed versions of a package(s) on your system. And there is currently no way to uninstall the specific version of the package except the most recent one using Chocolatey.

UPDATE: according to @ferventcoder's comment, Chocolatey of version 0.9.9+ does a real update now! This is huge improvement actually. Versions 0.9.8 and bellow do just an install as described earlier. See release notes for details about new C# client.

David Ferenczy Rogožan
  • 18,863
  • 8
  • 68
  • 65
3
cup all -y

or

chocolatey update all -y
Rajesh Kanna
  • 75
  • 1
  • 1
  • 8
  • 4
    DEPRECATION NOTICE - choco update is deprecated and will be removed or replaced in version 1.0.0 with something that performs the functions of updating package indexes. Please use `choco upgrade` instead. – Aleksey Cherenkov Mar 12 '18 at 13:56
3

Another option is to use the choco-upgrade-all-at-startup package by issuing:

choco install choco-upgrade-all-at-startup -y

Once the installation is complete, a scheduled task has been created that upgrades all packages when the computer boots. Note: if one uses a laptop, please ensure that this is on AC power. Otherwise the scheduled task will not be run and the chocolatey packages will not be updated.

030
  • 8,013
  • 8
  • 63
  • 100
2

For choco v0.10.1+, use:

choco upgrade

https://github.com/chocolatey/choco/wiki/CommandsUpgrade

From v1.0.0 choco update is deprecated:

DEPRECATION NOTICE - choco update is deprecated and will be removed or
 replaced in version 1.0.0 with something that performs the functions
 of updating package indexes. Please use `choco upgrade` instead.
user626201
  • 1,264
  • 2
  • 14
  • 33