LogoLogo
  • Introduction
  • CLI
    • Chocolatey
    • Docker
    • Git
    • nmap
    • npm
    • npm - n
    • npm - npm-check-updates (ncu)
    • npm - npm-license-crawler
    • Python
    • Ubuntu
    • Windows Commands
  • JS
    • JSDoc
Powered by GitBook
On this page
  • Installing Chocolatey
  • Install / Upgrade Packages
  • Pin
  • Usage
  • Examples
  • List
  • Usage
  • Options

Was this helpful?

  1. CLI

Chocolatey

PreviousIntroductionNextDocker

Last updated 5 years ago

Was this helpful?

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:

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""'"

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

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

Install source: Upgrade source:

Source:

Source:

https://chocolatey.org/docs/installation
https://chocolatey.org/docs/commandsinstall
https://chocolatey.org/docs/commandsupgrade
https://chocolatey.org/docs/commandspin
https://chocolatey.org/docs/commandslist