How to Use Chocolatey in Windows to Install Various Applications

How to Use Chocolatey in Windows to Install Various Applications

Chocolatey is a highly useful package manager with an easy to learn command line based on PowerShell or CMD, as well as a full-fledged GUI. If you have so many Windows programs that keeping all of them updated seems like a bit of a chore, it may be time to start making the switch to Chocolatey. This tutorial demonstrates how to install Chocolatey in Windows and use it to install, update, and uninstall any third-party applications and packages.

Installing Chocolatey in Windows

Package managers are a little like app stores in that they allow you to manage and update all of your programs through a single interface rather than having to deal with them all individually. While Chocolatey is a free package manager, there’s also a commercial Chocolatey edition available for paid users.

Once you get Chocolatey up and running, you can always stick with the GUI alone. The developers have added extensive instructions on their website, which you may need to refer to if you don’t have administrative rights on your machine. If you want to stick with the software’s free version, install the package manager for “Individual users” using the different methods below.

1. The Easy PowerShell Method

We are using the PowerShell instructions here, as we’ve found they work more reliably than the CMD method.

  • Search for the Windows PowerShell app via Windows Search and open the program in Administrator mode.
Searching for PowerShell via Windows Search.
  • Paste in Get-ExecutionPolicy and hit Enter. If it shows “Unrestricted,” skip to step #5.
Execution policy in PowerShell for external scripts shows as
  • If you see it return “Restricted,” you will have to change over to “Unrestricted.” “Restricted” means that PowerShell uses a cmdlet for execution policy to protect your PC from harmful scripts.
  • To install any third-party script, you must change the execution policy to allow all scripts. This is done using Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process. As Chocolatey is a safe software to use, there’s nothing to worry about.
  • You’ll need to paste in the install command:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

  • You’ll see some installation text scroll by. Chocolatey will install by downloading its latest version.
  • Type exit to get out of PowerShell.
Various steps of Chocolatey installing automatically in Windows 11 PowerShell window.
  • The above installation will add ChocolateyInstall as an environment variable.
ChocolateyInstall added as Environment Variables.
  • It will also create a Chocolatey folder in your “C:\” drive (if it doesn’t already exist).
Chocolatey folder in Windows 11 with all constituent files and packages

2. Additional Methods to Install Chocolatey in Windows

There are a few other methods to install Chocolatey. Refer to the official Chocolatey website for more shortcuts.

  • NuGet Package Manager: if you have Visual Studio 2010+ and NuGet extension installed on your Windows device, just enter the following command to install Chocolatey:

Install-Package chocolatey Initialize-Chocolatey Uninstall-Package chocolatey

  • NuGet.exe in PowerShell: in the PowerShell window, enter the following command, a NuGet command-line extension.

nuget install chocolatey

  • Windows built-in compression: an environment variable method that will install Chocolatey using the two-step command below.

$env:chocolateyUseWindowsCompression = 'true'# install script

Installing Chocolatey GUI in PowerShell

For a time, Chocolatey was only available through the command line, which limited its potential audience to people who weren’t scared off by that, but its GUI has been getting steadily better, making it accessible to just about anyone.

If you want to stick with the GUl, though, you’ll still need to learn simple commands, like choco install and choco upgrade, that will allow you to manage programs in the command line (CMD or PowerShell).

  • In the PowerShell admin window, type or paste in:

choco install chocolateygui

Install command of Chocolatey GUI in Windows 11 PowerShell.
  • This will start downloading and installing the GUl program you’ll need to visually manage Chocolatey.
  • Select Y to finalize the installation. If you don’t want to be bothered by this for each step, just type A.
Various steps of installing Chocolatey GUI in PowerShell window with permission to run script.
  • Wait for all the Chocolatey GUI packages to be installed. Once it’s done, you will see a success status of the final installation.
Chocolatey GUI installed status confirmed in PowerShell window.
  • After the installation, you can search for Chocolatey GUI in the Windows search box. It’s better to run the application as an administrator.
Chocolatey GUI app search in Windows 11 search box.

FYI: ever wondered what the difference is between PowerShell and Command Prompt? We outline what sets them apart in this guide.

Uninstall Chocolatey From Windows

If you want to uninstall Chocolately from your device (for maintenance and a Windows reset, perhaps) you can do it easily.

  • Open the PowerShell window and type the uninstallation command for Chocolatey. Check the official site to use the latest uninstallation code. You will need to press the red “Yes” button at the bottom to reveal the scripts.
Chocolatey uninstall code in PowerShell copy-pasted from official Chocolatey site.
  • If during uninstallation it says, “No Chocolatey installation detected” in the PowerShell window, you don’t need to do anything. Unless you have Chocolatey GUI installed on your Windows, there is no other way to tell whether the program is available on your device.
No Chocolatey installation detected message in PowerShell window.
  • Uninstalling Chocolatey also means removing its environment variables created during the installation process.
Uninstalling Chocolatey's environment variables in PowerShell window.
  • The Chocolatey GUI program, on the other hand, can be conveniently uninstalled from the “Add or remove programs” menu in Windows.
Uninstall Chocolatey GUI from the list of installed apps in Windows 11.

Installing Programs With Chocolatey

You can use either the Chocolatey GUI or PowerShell to install any program with Chocolatey.

Using Chocolatey GUI

  • Once you launch the utility, you’ll see two main tabs on the left: “This PC” and “chocolatey.”
  • “This PC” allows you to manage the programs you’ve installed via Chocolatey, and “chocolatey” allows you to search for programs you want to install.
Chocolatey's list of programs available on the This PC screen.
  • Browse through the entire list of applications to install the ones you need on your Windows device.
  • The Chocolatey program list is organized by the programs’ popularity. You can change that to a “List view” using the buttons in the top-right corner.
Chocolatey GUI List of programs view.
  • Browsing manually may be slow, so use the search bar to hunt for specific programs.
Search for desired application or package in Chocolatey GUI installed in Windows 11.
  • When you find the program you want, you can either check out more details on it or go straight to installing.
Clicking on a program in Chocolatey GUI for the options to install and view details.
  • If you click “Install,” it will install the latest package of the given program.
  • Click “Install advanced” for more advanced installation options, such as a different folder path, cache locations, and checksum values.
Check program installation options for a given program in Chocolatey GUI.
  • Wait a few seconds for the desired package to install via Chocolatey GUI.
A package installing in Chocolatey GUI on Windows 11.
  • All programs installed via Chocolatey will be visible in the “This PC” section of the main homescreen.
Third-party program installed via Chocolatey GUI and visible in the main dashboard.
  • The installed application can be opened from the Windows search box or “Apps” as a regular application.
Program installed via Chocolatey available in Windows 11 search box.

Using PowerShell

  • Once you use choco install [program], your program should set up pretty much on its own. Head to this link to find your desired packages. It will give you the exact syntax you require.
  • If the program is already installed on your device, use the --force argument to reinstall the latest package version.

choco install [program] --force

Chocolatey installing a given program using choco install in PowerShell with --force argument.
  • After the dialog is finished, you’ll find your new program in your Start menu with all the others.

Updating Programs With Chocolatey

Installing programs is easier with Chocolatey, but the update feature is where it really shines. ChocolateyGUI makes it very easy to see which of your programs are out of date. Getting them all up to speed takes just a few clicks.

  • To find your programs that can be updated through Chocolatey, go to “This PC” and check the box for “Show only packages with updates.” If it says, “No matching packages found,” none of the programs require an update at that time.
Show only packages with updates in Chocolatey GUI's package search.
  • If you just want to update one, you can right-click it and select “Update.”
  • On PowerShell, type the following to update any program of your choice. The update method will also reinstall a program if it says that it is not installed at the moment.

choco upgrade [program]

Choco upgrade command in PowerShell.
  • Chocolatey can also automatically update every program in its list. For this, you can use the Chocolatey GUI or choco upgrade all in the command line.
  • Updating your programs can now be a once-a-week task that just takes a few clicks.
Chocolatey upgrading all packages in its list using choco upgrade all

Uninstalling Programs With Chocolatey

As with the updates, Chocolatey makes it easy to uninstall several programs from the GUI interface or PowerShell.

  • In the GUI window, right-click on the installed program and select “Uninstall.”
Right-click on any installed program in Chocolatey GUI to uninstall it.
  • Before uninstalling a program, you will be asked to reconfirm the action through an “Are you sure?” dialog box. Click “Yes” to proceed.
Confirming are you sure to uninstall any application in Chocolatey GUI.
  • Wait a few seconds for the package to completely uninstall from the GUI. If it shows a failure message, just remove the visible duplicate instances of your program.
Package uninstalling in Chocolatey GUI.
  • Uninstalling a program using the PowerShell window is very easy as well. Use the following syntax:

choco uninstall [program]

  • If you misspelled a program name, watch for auto suggestions by Chocolatey so that you can get the syntax right. The program will automatically start uninstalling in front of you.
Uninstalling an application in PowerShell using Chocolatey's uninstall command.
  • After the program is uninstalled in the PowerShell window, you will see an uninstallation message.
Program uninstalled using Chocolatey in PowerShell window.

Frequently Asked Questions

How do I fix error messages while trying to install Chocolatey in PowerShell?

The main reason you would see an error message in PowerShell while installing Chocolatey is that the path may not be set correctly. Go to “Edit environment variables” from “System Properties -> Advanced” and check the “Path” value under “System Variables.” It needs to have a PowerShell entry such as C:\Windows\System32\WindowsPowerShell\v1.0\. If the entry is missing, add it to the “Path” variable. Restart the PC and any PowerShell errors will disappear. If you can’t get PowerShell to open for you, try these fixes.

Are there any Chocolatey alternatives?

There are many alternate package managers that you can use in place of Chocolatey. These include NuGet, Winget, Scoop.sh, npm, and Ninite.

Image credit: Pixabay. All screenshots by Sayak Boral.

Leave a Reply

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