How to install and use Chocolatey, a delicious package manager for Windows 10


Picture this: you need to install new software on your Windows PC. Chances are, you are heading to a website, trying not to click unwanted elements on the page, and then clicking on a graphical installer, most likely using the default settings.

It’s a routine you are probably familiar with because it has hardly changed in the life of Windows, since software began to be distributed online. Unix systems have an alternative approach, however, with software installations managed by package managers that require minimal user intervention and are often controlled via the command line. There is now growing interest in applying these benefits to Windows, through the use of third-party package managers.

We recently took a look at Scoop, which is a simple and accessible package manager solution. This article also contains a more in-depth discussion of the benefits of Terminal Package Managers over Windows graphical installers, so we encourage you to read it if you’re still new to the concept. Today we’re going to explore Chocolatey, which is an alternative Windows package manager with a slightly stronger focus on desktop apps for users.

Chocolatey is mainly controlled from the command line. Don’t worry if you’re new to console apps – type in the commands as instructed in the documentation and you shouldn’t experience any issues. Chocolatey also has an optional GUI which we’ll explore later.

Installing Chocolatey

To install Chocolatey, open PowerShell from the Start menu. Then copy and paste the following script line and press Enter:

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

This will configure PowerShell to allow execution of external scripts, before downloading and running the Chocolatey install script. For more details on this process, you should refer to Chocolatey’s own documentation. If you are concerned about what the script is doing, you should manually inspect it before running the command.

Install programs with Chocolatey

The main feature of Chocolatey is the ability to install Windows software with just one command. Instead of having to visit a website and manually click on an installer, you can launch PowerShell and type something like the following:

choco install vlc

Screenshot of using the chocolate package manager

This will download and install VLC Media Player on your system, without any action on your part. You will see the progress information displayed in your console as VLC is added to your system. You will then find it in your Start menu as if you were running the installer yourself.

Some programs may prompt you to run scripts when they are installed. Type “A” for “Yes to all” in the console, then press Enter to acknowledge this prompt and complete the installation.

Screenshot of using the chocolate package manager

Chocolatey supports thousands of different programs. You can see what’s available by browsing the Chocolatey package repository. Some of the more popular options include Chrome, Adobe Reader, Firefox, WinRAR, and Skype. The package repository displays the name to add to the “choco install” command to install each item.

Updating installed programs

Chocolatey makes it easy to update the programs you have installed. Run the following command to upgrade each obsolete Chocolatey package on your system:

choco upgrade all

You can also pass the name of an application to update a single program:

choco ugprade vlc

Chocolatey will check if updates are needed and automatically install the new version. If you want to see if any updates are available, without installing them, run “choco outdated” instead.

Other commands

There are a few other Chocolatey commands that you will probably find useful.

Running “choco list -lo” will display a list of all the programs you have installed. You can run “choco search query” to search the “query” package repository and view all matching programs, so you don’t even need a web browser to find new software.

Screenshot of using the chocolate package manager

When it comes to removing a program, use the command “choco uninstall”, adding the name of the program. Chocolatey also does its best to keep track of apps deleted by other means – if you install a program with Chocolatey but then remove it from the Windows Settings app or Control Panel, it should also disappear automatically. by Chocolatey.

Chocolately is very potent and we have only scratched the surface of its features with this article. There are many configuration options for advanced users, as well as the ability to run local proxies, caches, and package repositories. Chocolately also offers paid options for business and organizational use.

Chocolatey user interface

Finally, it should be noted that Chocolatey has an optional GUI which helps you interact with your packages and install new ones. As you might expect, the installation of the user interface is done through Chocolatey itself!

Screenshot of using the chocolate package manager

Run “choco install chocolateygui” to install the GUI. You can then launch the graphical interface from your Start menu.

Screenshot of using the chocolate package manager

This gives you a simple graphical interface to view your installed packages, check for updates, and customize Chocolatey settings. You can browse the Chocolatey catalog by clicking on “chocolatey” in the left sidebar. Here, you can search for new programs and install them with just one click, avoiding using PowerShell more if console apps aren’t for you.

Share this post:


Comments are closed.