Chocolatey: the best way to install applications in Windows

Bishwarup Paul
Nerd For Tech
Published in
7 min readNov 15, 2021

--

Introduction

One of the many factors Linux users generally rave about is the ease of installing applications in their systems. Linux systems come with software repositories, from where all the needed applications can be downloaded and installed. Think of software repositories as Play Store in your Android devices, or App Store in your Apple devices — You just open the store, search for an application, and click ‘Install’. In Linux systems, you can access their software repository using package managers.

There are several package managers in the Linux world, such as aptin Ubuntu, dnfin Fedora and pacman in Arch — just to name a few. You can use graphical app stores (like Play Store or App Store) build on top of these package managers to install applications; but most experienced Linux users prefer to write commands in the terminal to install applications — and it is really easy as well. For example, if you want to install Mozilla Firefox in Ubuntu, you just type sudo apt install firefox, then type in your password, hit ‘Enter’ — and done! As easy as that! (sudo is used to grant you administrator privileges for installation, like when Windows asks you “Do you want this app to make changes to your device?” ). If you are not sure about what the package is called or if it is available in the repository, you can search simply using apt search firefox. If you want to update all the applications installed at one go, just type sudo apt update followed by sudo apt upgrade! A big plus-point of software repositories are their security, as all packages are checked and verified by developers, and therefore you can be certain that installing an application would not cause any issues.

The default way to install applications in Microsoft Windows, for years, was to search for an application using your web browser, download the installer file, and then run the installer. The scenario has changed in recent years, with Microsoft introducing an app store (Microsoft Store), where you can search for applications and click ‘Install’. Though the number of applications in the store has increased, it is still infinitesimal compared to the number of applications available for Windows. Recently, Microsoft has introduced a command-based package manager called ‘Windows Package Manager’ (or ‘winget’), where you can search and install packages by entering commands in the terminal. The number of packages in the repository is growing, but is still very small. Granted, not all applications for Linux are available in their repositories, and in some cases you need to search and download an installer, but generally software repositories in Linux are vast and almost all applications can be found.

This is where Chocolatey comes to rescue. It is a very easy package manager for Windows, and has a huge library of applications in their repository. Chocolatey itself is easy to install, and installing applications and updating installed applications is “super easy, barely an inconvenience”! But before we go on, there needs to be a big disclaimer!

Disclaimer:

Chocolatey repository consists of open-source software such as VLC (source code is available to check, use or modify for free), freeware such as Adobe Reader (code is proprietary and not available for free, but is free to use) and shareware such as Spotify (code is proprietary, free to use but either for a limited time, or payment is required for unlocking all features). What Chocolatey does not have in its repository are paid applications such as Adobe Creative Cloud apps or Microsoft Office, which you requires you to pay before you can use.

Benefits of using Chocolatey

  1. Searching for an application online, going to the download page, downloading the installer and then running the installer by double-clicking on it — is a hassle. It is much easier to search from the terminal and writing a small command to install the application.
  2. Chocolatey gives you the option of installing multiple applications with one command. In the traditional Windows method, you would have to search, download installers and run them one by one for each application you want to install.
  3. In Windows, you have to make sure that you are downloading an installer file from an official source or a trusted website. There has been numerous instances in the past where people have gotten viruses or malware in their systems through installers downloaded wrong sources. Chocolatey, like software repositories in Linux, circumvents this problem by checking all the applications for integrity and ensures that they are virus-free.
  4. Updating applications in Windows in another headache. If the application has a built-in updater, it will notify you to update. In some cases, the application does not have an updater, and you have to manually check for updates in their website and install it. In any case, you have to update all the applications one-by-one. With chocolatey, you can update all of the installed applications with just one command.

Installation of Chocolatey

First, open a PowerShell window. Click on the Start button, type ‘powershell’. In the search result, you should see ‘Windows PowerShell’. Right click on it, and select ‘Run as administrator’. In the PowerShell window, copy and paste the following command, and hit enter:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

This command will install Chocolatey on your system. The help page on Chocolatey website asks to check whether ExecutionPolicy is restricted or not at the first step, before running the install command; but the extra step is not required as the installation step takes care of all the requirements.

Installing applications using Chocolatey

Once Chocolatey is installed, you will need a to run either a Powershell window or a Command Prompt as administrator to install applications — any one will do.

To search for an application, such as Mozilla Firefox, you can just type the following command in the terminal —

choco search firefox

You will, in many cases, get many options, or many version of the same application. Select which one you want to install, and use the exact name of the package to install, using the following command

choco install firefoxesr

In this case, I looked at the list of options, and installed Firefox ESR (Extended Release Version).

If you want, you can also search for applications at the Chocolatey website using their search function, instead of in the terminal. The benefit is, you can copy the exact command to install the application you want from the website, and paste it at the terminal.

Searching for applications at the Chocolatey Website

To install multiple applications at one go, you just need to type the name of all the applications with spaces in the install command.

choco install inkscape gimp krita audacity mpv ffmpeg youtube-dl

One downside of this approach is that you have to press Enter multiple times to give permission to install all of the applications — but that can easily be remedied. Before installing any application, run the following command at the terminal —

choco feature enable -n allowGlobalConfirmation

This will setup the terminal to not ask for permission when installing either single or multiple applications.

Disclaimer

Be careful when installing packages for the first time. There can be some packages which has yet not been verified, or have been flagged in virus tests, or are outdated. You can view such details in the chocolatey website, or by running the following command in the terminal:

choco info firefox
An application with multiple failed verification tests

For example, if you search for the package PasswordFox in Chocolatey, you can see that it has failed verification tests and virus scans. Be careful with installing packages in such situations.

Updating installed applications

Application updates can be done one-by-one, multiple at once, or all at once. If you want to only update Mozilla Firefox, for example, then run the following command:

choco upgrade firefox

To update multiple applications, type their names with spaces after choco upgrade. If you want to update all applications at one go, then simply run:

choco upgrade all

To update Chocolatey itself, run choco upgrade chocolatey.

Uninstalling applications

To uninstall applications, you run choco uninstall for one or several packages.

Epilogue

Chocolatey is a fantastic way to handling applications in Windows. It is a fast and hassle-free package manager, and is the best option in my opinion. I have been using chocolatey since the day I discovered it, and never had any problems.

Sure, there are alternatives such as Ninite, which lets you download and install multiple applications at once, or even the recent Windows Package Manager — but Chocolatey beats them by a long margin in terms of sheer number of applications available in the repository.

In this post, I have mentioned only a few of the various options and parameters available in chocolatey. Do go to Chocolatey website to read about all the available options, they have a fantastic documentation.

If you try Chocolatey after reading this post, and if you find it useful, please let me know in the comments. Ciao!

--

--

Bishwarup Paul
Nerd For Tech

A nature-enthusiast appreciating technology, and a technology-obsessed exploring nature.