Chocolatey Package Manager

Posted on
Chocolatey Package Manager 9,3/10 4529 votes
  1. Chocolatey Package Manager Manager
  2. Chocolatey Package Manager Windows

Nov 13, 2017 - Looking for a tool to automate installing, configuring, upgrading and uninstalling software packages on Windows systems? Time to check out. In today's Ask the Admin, Russell Smith looks at the Chocolatey package manager for Windows, what it does, and how it can simplify software deployment on servers and end-user devices.

The sane way to manage software on Windows. Chocolatey builds on technologies you know - unattended installation and PowerShell. Chocolatey works with.

You can just call me choco.

  • Information
  • Committers
    • Compiling / Building Source
      • Other Platforms

Build Status

TeamCityAppVeyorTravis

Chat Room

Come join in the conversation about Chocolatey in our Gitter Chat Room.

Or, you can find us in IRC at #chocolatey on freenode. IRC is not as often checked by committers, so it is recommended you stick to Gitter if you need more timely assistance.

Please make sure you've read over and agree with the etiquette regarding communication.

Support Chocolatey!

  • Purchase Chocolatey Pro / Chocolatey for Business

See Chocolatey In Action

Chocolatey FOSS install showing tab completion and refreshenv (a way to update environment variables without restarting your shell):

Chocolatey Pro showing private CDN download cache and virus scan protection:

Etiquette Regarding Communication

If you are an open source user requesting support, please remember that most folks in the Chocolatey community are volunteers that have lives outside of open source and are not paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. A little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that.

If you are using a commercial edition of Chocolatey, you have different terms! Please see support.

Information

  • Mailing List / Release Announcements Only Mailing List / Build Status Mailing List
  • Twitter / Facebook / Github
  • Blog / Newsletter
  • Documentation / Support

Documentation

Please see the docs

Give choco.exe -? a shot (or choco.exe -h). For specific commands, add the command and then the help switch e.g. choco.exe install -h.

Requirements

  • .NET Framework 4.0+
  • PowerShell 2.0+
  • Windows Server 2003+ / Windows 7+

License / Credits

Apache 2.0 - see LICENSE and NOTICE files.

Adobe Acrobat Reader - Free Download for Windows 10 [64 bit / 32 bit] Download Adobe Acrobat Reader latest version 2018 free for windows 10, 8, 8.1 and 7| Setup installer [64 bit, 32 bit, Offline]. The most popular free PDF reader to view, print, and annotate PDFs. Free adobe acrobat reader for windows 10. Guide Adobe Acrobat for Windows 10 Paid This guide helps you to know the features present in adobe acrobat dc and various products available on the app. Adobe Reader is the most popular program in the world for viewing, creating, managing and manipulating PDF (Portable Document Format) files. It is the standard that all other PDF readers.

Submitting Issues

  • If you are having issue with a package, please see Request Package Fixes or Updates / Become a maintainer of an existing package.
  • If you are looking for packages to be added to the community feed (aka https://chocolatey.org/packages), please see Package Requests.
  1. Start with Troubleshooting and the FAQ to see if your question or issue already has an answer.
  2. If not found or resolved, please follow one of the following avenues:
    • If you are a licensed customer, please see support. You can also log an issue to Licensed Issues and we will submit issues to all other places on your behalf. Another avenue is to use email support to have us submit tickets and other avenues on your behalf (allowing you to maintain privacy).
    • If it is an enhancement request or issue with the website (the community package repository aka https://chocolatey.org), please submit the issue to the Chocolatey.org repo.
    • If you have found an issue with the GUI (Chocolatey GUI) or you want to submit an enhancement, please see the ChocolateyGUI repository.
    • If you have found an issue with the client (choco.exe), you are in the right place. Keep reading below.

Observe the following help for submitting an issue:

Prerequisites:

  • The issue has to do with choco itself and is not a package or website issue.
  • Please check to see if your issue already exists with a quick search of the issues. Start with one relevant term and then add if you get too many results.
  • You are not submitting an 'Enhancement'. Enhancements should observe CONTRIBUTING guidelines.
  • You are not submitting a question - questions are better served as emails or gitter chat questions.
  • Please make sure you've read over and agree with the etiquette regarding communication.

Submitting a ticket:

  • We'll need debug and verbose output, so please run and capture the log with -dv or --debug --verbose. You can submit that with the issue or create a gist and link it.
  • Please note that the debug/verbose output for some commands may have sensitive data (passwords or apiKeys) related to Chocolatey, so please remove those if they are there prior to submitting the issue.
  • choco.exe logs to a file in $env:ChocolateyInstalllog. You can grab the specific log output from there so you don't have to capture or redirect screen output. Please limit the amount included to just the command run (the log is appended to with every command).
  • Please save the log output in a gist (save the file as log.sh) and link to the gist from the issue. Feel free to create it as secret so it doesn't fill up against your public gists. Anyone with a direct link can still get to secret gists. If you accidentally include secret information in your gist, please delete it and create a new one (gist history can be seen by anyone) and update the link in the ticket (issue history is not retained except by email - deleting the gist ensures that no one can get to it). Using gists this way also keeps accidental secrets from being shared in the ticket in the first place as well.
  • We'll need the entire log output from the run, so please don't limit it down to areas you feel are relevant. You may miss some important details we'll need to know. This will help expedite issue triage.
  • It's helpful to include the version of choco, the version of the OS, and the version of PowerShell (Posh) - the debug script should capture all of those pieces of information.
  • Include screenshots and/or animated gifs whenever possible, they help show us exactly what the problem is.

Contributing

If you would like to contribute code or help squash a bug or two, that's awesome. Please familiarize yourself with CONTRIBUTING.

Committers

Committers, you should be very familiar with COMMITTERS.

Compiling / Building Source

Chocolatey install multiple programs

There is a build.bat/build.sh file that creates a necessary generated file named SolutionVersion.cs. It must be run at least once before Visual Studio will build.

Windows

Prerequisites:

  • .NET Framework 3.5 (This is a windows feature installation).
  • .NET Framework 4+
  • Visual Studio is helpful for working on source.
  • ReSharper is immensely helpful (and there is a .sln.DotSettings file to help with code conventions).

Build Process:

  • Run build.bat.

Running the build on Windows should produce an artifact that is tested and ready to be used.

Other Platforms

Prerequisites:
  • Install and configure Mono 3.12.0 (3.8.0 should also work).
  • Xamarin Studio is helpful for working on source.
  • Consider adding the following to your ~/.profile (or other relevant dot source file):
  • Set your permissions correctly:
Build Process:
  • Run ./build.sh.

Running the build on Mono produces an artifact similar to Windows but may have more rough edges. You may get a failure or two in the build script that can be safely ignored.

Credits

Chocolatey is brought to you by quite a few people and frameworks. See CREDITS (just LEGAL/Credits.md in the zip folder).

Most Windows users don’t pay much attention to how desktop programs are installed on their system. For years we’ve been trained to seek out a website, download an EXE or MSI file, and then click, click, click our way through the installation.

It’s an easy method, but it’s also time consuming because of the manual interaction.

A burgeoning project called Chocolatey wants to make it easy to install desktop apps without having to click through an interminable number of installation windows.

What is Chocolatey?

Chocolatey is a command line application installer for Windows based on a developer-centric package manager called NuGet. Unlike manual installations, Chocolatey adds, updates, and uninstalls programs in the background requiring very little user interaction.

Chocolatey has its own package feed that is created and maintained by the project’s community members.

Behind the scenes, most Chocolatey packages simply download a program’s official executable and install it without any further interaction from the user.

You lost me at “command line”

No, wait, hear me out!

Getting new programs the old fashioned way is very easy, but manual installs are also inefficient. Wouldn’t you rather spend your time checking out the latest cat videos on YouTube while your PC goes about installing programs by itself?

That’s the promise of Chocolatey. If the program has any dependencies, such as the .NET framework, Chocolatey will install those too.

Chocolatey can also take care of multiple program installations.

Imagine cracking open a new PC, downloading Chocolatey and then typing a one-line command to install all the programs you’d like to have on your new machine. That's what Chocolatey does.

Installing Chocolatey

Getting Chocolatey onto your system is very simple since the commands can be copied and pasted into your command prompt from Chocolatey.org. To start, you need to open an elevated command prompt.

Chocolatey Package Manager Manager

To do this in Windows 8.1, click on the Start button and go to the all apps screen. Under the Windows System heading find Command Prompt, right click-it and select Run as administrator. When the User Account Control window opens, authorize it by clicking Yes.

A command prompt window should open with something like C:WINDOWSsystem32.

Next, visit Chocolatey.org and copy the first box. At this writing, the commands were:

Paste it into the prompt, press Enter and your PC will take care of the rest.

Usually doing a copy and paste of commands is not advisable, but in this case it’s just fine.

So you can rest easier, let’s break the instructions down a little bit: These commands are telling your PC to launch PowerShell and don’t load any custom profiles a power user might have. Next, it tells Windows to set the execution policy to unrestricted to allow any PowerShell script to be run and then download and run the Chocolatey install script.

Chocolatey package manager

Chocolatey basics

Installing programs Chocolatey style

Once you’ve got Chocolatey up and running, it’s time to start installing programs. Open an administrative command prompt again and type cinst [program name].If you wanted to install VLC you’d type:

Pretty easy, right? The trick is that you need to know the exact name Chocolatey uses for each program. You can’t just type Chrome or Google-Chrome and expect Chocolatey to figure it out.

To find the names of programs, you can try playing around on the command line with the trial and error method (which works more often than you’d think). If you don't have that kind of time, search Chocolatey.org’s online package catalog for programs. You can also search for packages right on the command line:

Chocolatey Package Manager Windows

Multiple installs

There are two ways to install multiple programs in one sitting with Chocolatey. The first is to type multiple arguments into the command line. If you wanted to install VLC, GIMP, and Firefox you’d type:

For much larger batches of programs, however, you’re better off creating an XML document with a .config file extension and formatting it like so:

That basic document structure can include as many programs as you like, and can even include alternative sources other than Chocolatey’s community feed. For a more thorough tutorial on creating a multiple install file, check out developerFusion.

Uninstalling and updating

Updating installed programs via Chocolatey is simple too. Type cup [program name] into an administrative command. To update DosBox, for example, type:

You can also update all your programs by typing cup all. If your package is using an alternative source other than the main Chocolatey package feed, you can type:

Uninstalling a package is a little different. Going back to our example, you'd type the following to uninstall DosBox:

On the next page, we'll cover standardized commands and security concerns.