Skip to content

Instantly share code, notes, and snippets.

@jimathyp
Last active May 25, 2021 23:28
Show Gist options
  • Select an option

  • Save jimathyp/308bdff0f62e8fc2e8496e6e2b6ac758 to your computer and use it in GitHub Desktop.

Select an option

Save jimathyp/308bdff0f62e8fc2e8496e6e2b6ac758 to your computer and use it in GitHub Desktop.

Chocolately

update all installed packages

cup all -y

list all installed packages

choco list -la

#install chocolatey

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

#generate list of installed applications with exact version

choco list -lo -r -y | % { "choco install " + $_.Replace("|", "  ") + " -y" }

#generate list of installed application without version.

choco list -lo --id-only -y | % { "choco install " + $_.Replace("|", "  ") + " -y" }

Upgrade packages

choco upgrade all -y
cup all -y

(older version of choco just installed the new version of a package alongside the old version)

Docs

https://docs.chocolatey.org/en-us/ https://docs.chocolatey.org/en-us/choco/commands/

choco list

choco list -l
--lo
--local
--localonly
--local-only

LocalOnly - Only search against local machine items.

Choco upgrade

  choco upgrade
  choco upgrade all -y
  cup -y all

  choco outdated

https://github.com/chocolatey/choco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment