HomeAbout MeContact

Using Chocolatey for Windows

By Daniel Padua
Published in Tips
May 05, 2019
1 min read
Using Chocolatey for Windows

Learn how to install and also the essentials to get by with Chocolatey for Windows

Intro

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.

Requirements

  • 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)

Installing

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('https://chocolatey.org/install.ps1'))

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('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Usage

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 https://chocolatey.org 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

Conclusion

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!


Tags

#chocolatey#windows#microsoft

Share


Previous Article
Using Homebrew for macOS
Daniel Padua

Daniel Padua

Software Developer

Topics

Cloud
Concepts
Programming
Tips

Related Posts

Git-bash with vscode
March 27, 2019
1 min
© 2025, All Rights Reserved.
Powered By

Quick Links

About MeContact

Social Media