Posts Using chocolatey for windows

Using Chocolatey for Windows

Windows logo with a plus sign followed by chocolatey logo


Well, let’s begin with the basic question: “What would Chocolatey be?”. Just as simple as the question, is the answer: “It is a package manager developed for Windows”.

Yes, we have now (not exactly now, because this project has been rolling approximately since 2014) a package manager for Windows like apt-get or yum for Linux, or Homebrew for Mac. And just as the mentioned, we can use it in infrastructure automation tools (or IaC — Infrastructure as code) like Puppet, Chef or Ansible.


  • Windows 7 or higher / Windows Server 2003 or higher

  • Powershell v2 or higher

  • .NET Framework 4 or higher (the Chocolatey installation will try to install this dependency in case you don’t have it)


First thing to do is run as administrator Powershell or Cmd, to do so, search for Powershell or Cmd in Start Menu, right button click and select “Run as Administrator”.

For Powershell use the following command line:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(''))

For Cmd use this command line:

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


And… done, the installation was just that. Now let’s have a look at the basic commands to manage packages:

Search packages

choco search $package_approximate_name

or visit and search

List installed packages

choco list --local-only

Installing packages

choco install $package_name

note.: Use -y if you wish to ignore the confirmation messages

Removing packages

choco uninstall $package_name

note.: Use -y if you wish to ignore the confirmation messages

Updating packages

choco upgrade $package_name

to update all your packages use:

choco upgrade all

note.: Use -y if you wish to ignore the confirmation messages


Chocolatey came to ease our life as Windows users and specially Windows administrators. Also made Windows environments more viable when using devops CI/CD tools.

See you soon!

This post is licensed under CC BY 4.0 by the author.