From Frustrated to Efficient: How Chocolatey Can Improve Your Windows Software Management

Phillip Peng
5 min readJan 12, 2023

If you ever feel frustrated with managing software in the Windows system, you shall read this post to learn to use a package manager.

Introduction

As a Windows user, you have likely experienced the frustration of manually managing your software. For example, keeping track of all the apps you use and keeping them up to date might be a never-ending task. Furthermore, looking for the most recent versions, downloading installers, and dealing with compatibility difficulties can consume a significant chunk of your time and resources. Also, downloading software from unknown sources brings you security concerns. Is there any better way to manage your software in the Windows system? The good news is “Yes. A package manager for Windows is the way to go.”

A package manager is a software application that enables users to effortlessly install, update, and manage software on their computers. It is a command-line utility that allows users to automate software administration operations, making it an incredible way for system administrators and power users.

What is Chocolatey?

Chocolatey is a package manager, similar to yum or apt-get for *nix (Linux) systems, but for Windows. As it is specifically designed for Windows, Chocolatey is optimized for the Windows ecosystem and can easily handle the unique challenges of Windows software management. Chocolatey is built on top of PowerShell and the NuGet package manager. It uses a centralized repository of software packages where users can search for and install the software they need. You simply pick what you wish to install, and Chocolatey will download and install (or upgrade) that program without any of your manual interventions. It automates the tedious and sometimes frustrating task of downloading, unzipping, extracting, checking compatibility, and installing the applications.

Installation of Chocolatey

The documentation page of the Chocolatey package explains many different ways to install Chocolatey. To keep it simple, we introduce the most common way of installation: install it through cmd.exe.

Two simple steps to install Chocolatey:

  1. Start the command shell as administrator:

2. Copy and paste the following command to the command shell and press Enter to run:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

That’s it. Wait a few seconds for the installation to complete.

After the installation is done, type ‘choco’ to check the installed version.

You can refer to the setup/install page for other installation approaches and considerations.

Basic usage and commands

Once Chocolatey is installed, you can start using it to manage your software. Here are some basic usage and commands you can use with Chocolatey:

  • choco install [package name]: This command is used to install a package. For example, to install Notepad++, you would run choco install notepadplusplus. Since we install Chocolatey as an administrator, we also need to run the command under administrator account.
  • choco upgrade [package name]: This command is used to upgrade a package to the latest version. For example, to upgrade Notepad++, you would run choco upgrade notepadplusplus.
  • choco uninstall [package name]: This command is used to uninstall a package. For example, to uninstall Notepad++, you would run choco uninstall notepadplusplus.
  • choco list: This command is used to list all packages installed on your system.
  • choco search [package name]: This command is used to search for a package in the Chocolatey repository. For example, to search for Notepad++, you would run choco search notepadplusplus.
  • choco outdated: This command is used to check for outdated packages.
  • choco pin : This command will pin a package to a specific version, so it does not upgrade automatically
  • choco unpin : This command will unpin a package from a specific version and it will upgrade automatically.

These are just some basic usage and commands that you can use with Chocolatey. For more detailed information, you can refer to the Chocolatey documentation, available at https://chocolatey.org/docs

The Chocolatey package repository

The Chocolatey package repository is a centralized collection of software packages that can be easily searched and installed through the Chocolatey package manager. It contains a wide range of packages, provided by both the Chocolatey team and the community, which can be used to easily manage software on Windows systems. The repository is regularly reviewed and updated for quality and security, and it is a valuable tool for both system administrators and power users.

There are 9,547 community-maintained packages in the repository as of January 11, 2023. Each package in the repository includes all the necessary information for Chocolatey to install, update, and manage the software, including the software’s name, version number, and location to download the software. The repository also includes information about the package’s dependencies, which Chocolatey uses to ensure that all necessary dependencies are installed and up-to-date before installing the package.

The Chocolatey package repository can be accessed through the command line using the choco search command. For example, to search for the Notepad++ package in the repository, you would run choco search notepadplusplus. This command will return a list of all packages in the repository that match the search term and information about the package, such as its version number and the number of downloads.

Additionally, Chocolatey also supports creating a custom package repository, which allows users to create their own repository with their own packages. This feature is particularly useful for organizations that want to maintain their own package repository and manage the software internally.

With the help of Chocolatey, managing software on your Windows systems can be a much more efficient and less frustrating process. Whether you’re a system administrator or a power user, Chocolatey can help you save time and effort when it comes to software management. Add it to your tool set and enjoy it.

--

--