Command Reference


This is a listing of all of the different things you can pass to choco.

Please run chocolatey with choco command -help for specific help on
each command.

How To Pass Options / Switches

You can pass options and switches in the following ways:

Scripting / Integration - Best Practices / Style Guide

When writing scripts, such as PowerShell scripts passing options and
switches, there are some best practices to follow to ensure that you
don't run into issues later. This also applies to integrations that
are calling Chocolatey and parsing output. Chocolatey uses
PowerShell, but it is an exe, so it cannot return PowerShell objects.

Following these practices ensures both readability of your scripts AND
compatibility across different versions and editions of Chocolatey.
Following this guide will ensure your experience is not frustrating
based on choco not receiving things you think you are passing to it.

Here's an example following bad practices (line breaks added for

`choco install pkg1 -y -params '/Option:Value /Option2:value with
 spaces' --c4b-option 'Yaass' --option-that-is-new 'dude upgrade'`

Now here is that example written with best practices (again line
breaks added for readability - there are not line continuations
for choco):

`choco upgrade pkg1 -y --source="''"
 --package-parameters="'/Option:Value /Option2:value with spaces'"
 --c4b-option="'Yaass'" --option-that-is-new="'dude upgrade'"`

Note the differences between the two:

Chocolatey ignores options it doesn't understand, but it can only
ignore option values if they are tied to the option with an
equals sign ('='). Note those last two options in the examples above?
If you roll off of a commercial edition or someone with older version
attempts to run the badly crafted script --c4b-option 'Yaass' --option-that-is-new 'dude upgrade', they are likely to see errors on
'Yaass' and 'dude upgrade' because they are not explicitly tied to the
option they are written after. Now compare that to the other script.
Choco will ignore --c4b-option="'Yaass'" and
--option-that-is-new="'dude upgrade'" as a whole when it doesn't
register the options. This means that your script doesn't error.

Following these scripting best practices will ensure your scripts work
everywhere they are used and with newer versions of Chocolatey.

See Help Menu In Action

choco help in action

Default Options and Switches

NOTE: Options and switches apply to all items passed, so if you are
running a command like install that allows installing multiple
packages, and you use --version=1.0.0, it is going to look for and
try to install version 1.0.0 of every package passed. So please split
out multiple package calls when wanting to pass specific options.

 -?, --help, -h
     Prints out the help menu.

 -d, --debug
     Debug - Show debug messaging.

 -v, --verbose
     Verbose - Show verbose messaging. Very verbose messaging, avoid using
       under normal circumstances.

     Trace - Show trace messaging. Very, very verbose trace messaging. Avoid
       except when needing super low-level .NET Framework debugging. Available
       in 0.10.4+.

     --nocolor, --no-color
     No Color - Do not show colorization in logging output. This overrides
       the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+.

     --acceptlicense, --accept-license
     AcceptLicense - Accept license dialogs automatically. Reserved for
       future use.

 -y, --yes, --confirm
     Confirm all prompts - Chooses affirmative answer instead of prompting.
       Implies --accept-license

 -f, --force
     Force - force the behavior. Do not use force during normal operation -
       it subverts some of the smart behavior for commands.

     --noop, --whatif, --what-if
     NoOp / WhatIf - Don't actually do anything.

 -r, --limitoutput, --limit-output
     LimitOutput - Limit the output to essential information

     --timeout, --execution-timeout=VALUE
     CommandExecutionTimeout (in seconds) - The time to allow a command to
       finish before timing out. Overrides the default execution timeout in the
       configuration of 2700 seconds. '0' for infinite starting in 0.10.4.

 -c, --cache, --cachelocation, --cache-location=VALUE
     CacheLocation - Location for download cache, defaults to %TEMP% or value
       in chocolatey.config file.

     --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build
     AllowUnofficialBuild - When not using the official build you must set
       this flag for choco to continue.

     --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output
     FailOnStandardError - Fail on standard error output (stderr), typically
       received when running external commands during install providers. This
       overrides the feature failOnStandardError.

     UseSystemPowerShell - Execute PowerShell using an external process
       instead of the built-in PowerShell host. Should only be used when
       internal host is failing. Available in 0.9.10+.

     Do Not Show Progress - Do not show download progress percentages.
       Available in 0.10.4+.

     Proxy Location - Explicit proxy location. Overrides the default proxy
       location of ''. Available for config settings in, this CLI
       option available in 0.10.4+.

     Proxy User Name - Explicit proxy user (optional). Requires explicity
       proxy (`--proxy` or config setting). Overrides the default proxy user of
       '123'. Available for config settings in, this CLI option
       available in 0.10.4+.

     Proxy Password - Explicit proxy password (optional) to be used with
       username. Requires explicity proxy (`--proxy` or config setting) and
       user name.  Overrides the default proxy password (encrypted in settings
       if set). Available for config settings in, this CLI option
       available in 0.10.4+.

     ProxyBypassList - Comma separated list of regex locations to bypass on
       proxy. Requires explicity proxy (`--proxy` or config setting). Overrides
       the default proxy bypass list of ''. Available in 0.10.4+.

     Proxy Bypass On Local - Bypass proxy for local connections. Requires
       explicity proxy (`--proxy` or config setting). Overrides the default
       proxy bypass on local setting of 'True'. Available in 0.10.4+.

     Log File to output to in addition to regular loggers. Available in 0.1-

NOTE: This documentation has been automatically generated from choco -h.