Chocolatey

Installing Chocolatey

Install with cmd.exe

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Install with PowerShell

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Source: https://chocolatey.org/docs/installation

Install / Upgrade Packages

Note: Remember to run as administrator

To install:

choco install [package name]
cinst [package name]

List outdated packages:

choco outdated

Upgrade all outdated packages that aren't pinned:

choco upgrade all
cup all

Options:

  • Install/upgrade in a specific directory: --params="'/installLocation:""C:\tools""'"

Install source: https://chocolatey.org/docs/commandsinstall Upgrade source: https://chocolatey.org/docs/commandsupgrade

Pin

Usage

choco pin [list]|add|remove [<options/switches>]

Examples

choco pin
choco pin list
choco pin add -n=git
choco pin add -n=git --version 1.2.3
choco pin remove --name git

Source: https://chocolatey.org/docs/commandspin

List

Usage

  choco search <filter> [<options/switches>]
  choco list <filter> [<options/switches>]
  clist <filter> [<options/switches>]

Options

  • Only local: -l, --lo, --localonly, --local-only

  • Exact name: -e, --exact

Source: https://chocolatey.org/docs/commandslist

Last updated

Was this helpful?