Since the dawn of Windows, the traditional way of installing software on Windows is by opening up a browser, searching for the desired tool, downloading an EXE, MSI, etc. file, and finally going through the laborious task of clicking Next, accepting terms and conditions, and finally installing the program.

Most Linux distributions make use of software repositories to collect and categorize most known packages and provide a centralized interface to install, update and remove them.

Well, the folks over at Chocolatey Software have been building a community-supported package manager and repository for Microsoft Windows. In this guide, we’ll look at how to install Chocolatey on your PC and see how easy it is to install, update and remove applications.

Optional: Installing Windows Terminal (Windows 10 only)

Wait, a terminal? If the term terminal reminds you of computer nerd typing commands on a black window to take over the entire system; you’re right. While GUI applications have the advantage of user interactions and experience, the terminal is immensely powerful for automation, scripting, etc.

Windows come baked in with two terminal prompts, Command Prompt and Windows Powershell. Windows Terminal is the new replacement for both of them and is currently in development.

Installing Windows Terminal is pretty easy. Just fire up Microsoft Store, search for Windows Terminal (or use the link below), and hit the Install button.

Microsoft Store > Windows Terminal

Installing delicious Chocolate(y)

Open up Windows Terminal or Windows Powershell as administrator. You can do this by right-clicking the program icon and selecting the “Run as Administrator” option in the context menu. Processes with admin privilges are called Elevated Processes.

Head to this link below and scroll down a little to find the command you need to install Chocolatey.

At the time of this article, the command is:

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 sets the Execution Policy for the current session to process and download, and executes the Chocolatey install script. If no error pops up, Chocolatey has successfully installed and is ready to be used!

Searching for Packages

Chocolatey maintains an online index of all packages here.

Alternatively, you can use Terminal to search for a package. Let’s say you want to search for VLC Media Player. You can do this by executing the following command in an elevated terminal session:

choco search vlc

This returns the following search results. I’ve highlighted the package of our interest in red.

choco search results for VLC package

We can break the returned search results down into parts. For vlc 3.0.16 [Approved]:

  • The first part is the package name, i.e. vlc. This is important since we’ll be using this to install, update, or remove the package.
  • The second part is the version number, i.e. 3.0.16. This corresponds to the software version number.
  • The third part is the package status, i.e. Approved. This means that a community moderator trusted by chocolatey approved the package and is safe to install. A note sometimes follows this, which we don’t need to worry about.

Alternatively, we can search it using their online search engine too. Searching for the same package returns the following results:

Online search results for VLC package

The search listings also show the command, pointed with a red arrow in the screenshot, that has to be executed to install the said package.

Installing Package

Now onto the fun part! Chocolatey makes installing packages easy. Once you’ve searched for your package, installing it is as simple as executing the following command:

choco install vlc

This performs the following steps:

  • Fetch install script of the package from Chocolatey’s repositories.
  • Fetch install files for the program.
  • Perform a silent installation of the program.

You’ll be asked to agree to terms and conditions during the installation. Enter Y (Yes) or A (All) to proceed.

Installing VLC package

VLC is now installed and can be found in your Start Menu!

Start Menu search results for VLC

Updating Package

If the install keyword ‘installs’ a package, the update keyword ‘updates’ it. 😊

choco update vlc

Uninstalling Package

To uninstall a package, use the uninstall keyword followed by the package name:

choco uninstall vlc

Conclusion

Chocolatey makes software installation easy. With a healthy selection of supported packages, it is a great tool to automate software installation and maintainence. We’ve barely scratched the surface. If you want to know more, check out their awesome introductory courses here.

Leave a Reply

Your email address will not be published. Required fields are marked *