Using Chocolatey for Windows

Daniel Padua Ferreira
Daniel Padua Blog
2 min readJun 11, 2019

--

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:

For Cmd use this command line:

Usage

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

Search packages

or visit https://chocolatey.org and search

List installed packages

Installing packages

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

Removing packages

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

Updating packages

to update all your packages use:

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!

If you found this post useful and would like to support me, you can do so by buying me a coffee using the button above!

Originally published at https://blog.danielpadua.dev on May 5, 2019.

--

--

Daniel Padua Ferreira
Daniel Padua Blog

Microsoft Certified Professional (MCP), Certified Tester Foundation Level (CTFL), Software Engineer, Technology and Cryptocurrencies enthusiast