Chocolatey is an open-source package manager for Windows that brings Linux-style software management to the command line. It automates the process of installing, upgrading, configuring, and removing software on Windows systems – no more hunting through vendor websites, clicking through installers, or managing versions manually.
This guide covers how to install and use Chocolatey package manager on Windows 10, Windows 11, and Windows Server. You will learn to search, install, upgrade, uninstall, and pin packages, create bulk install configurations, and explore enterprise features like Chocolatey Central Management.
Prerequisites
Before you start, make sure you have the following in place:
- Windows 10, Windows 11, or Windows Server 2019/2022/2025
- Administrator access to the machine
- PowerShell v3 or later (ships with Windows 10+ and Server 2016+)
- .NET Framework 4.8 or later (Chocolatey installer handles this if missing)
Step 1: Install Chocolatey Package Manager on Windows
Chocolatey installs through a single PowerShell command. Open PowerShell as Administrator – right-click the Start menu, select Windows Terminal (Admin) or Windows PowerShell (Admin).
Run the following command to install Chocolatey:
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, forces TLS 1.2, then downloads and runs the official install script from Chocolatey Community Repository. The script installs Chocolatey to C:\ProgramData\chocolatey and adds it to your system PATH.
After installation completes, verify Chocolatey is working:
choco --version
You should see the installed version number:
2.7.0
If you get a “command not found” error, close and reopen your PowerShell window so the updated PATH takes effect.
Step 2: Search for Packages with Chocolatey
Chocolatey hosts thousands of packages in its community repository. Use choco search to find packages from the command line.
Search for a package by keyword:
choco search firefox
The results show package names, versions, and download counts:
Chocolatey v2.7.0
firefox 137.0 [Approved]
firefox-dev 137.0 [Approved]
firefox-nightly 139.0 [Approved]
firefoxesr 128.8.0 [Approved]
4 packages found.
To get detailed information about a specific package before installing it:
choco info git
This shows the package description, version, maintainer, dependencies, and download statistics – useful for verifying you are installing the right package.
Step 3: Install Packages Using Chocolatey
The choco install command downloads and installs packages silently. All commands in this section require an elevated (Administrator) PowerShell prompt.
Install a single package
Install a package by name. The -y flag confirms all prompts automatically:
choco install git -y
Chocolatey downloads the package, runs the installer silently, and adds the application to your PATH where applicable.
Install multiple packages at once
Pass multiple package names in a single command to install them together:
choco install vscode notepadplusplus 7zip -y
This installs Visual Studio Code, Notepad++, and 7-Zip in one operation. Chocolatey processes each package sequentially.
Install a specific version
Pin to a particular version when you need an older or specific release:
choco install nodejs --version=20.18.0 -y
This is useful for development environments where a specific Node.js LTS version is required. If you want to use the Windows Terminal for a better command-line experience while working with these tools, install it through Chocolatey as well.
Step 4: Upgrade Packages with Chocolatey
Keep software current with choco upgrade. This checks the community repository for newer versions and updates installed packages.
Upgrade a single package:
choco upgrade git -y
Upgrade all installed packages at once:
choco upgrade all -y
Check which packages have updates available before upgrading:
choco outdated
The output lists every installed package that has a newer version in the repository, showing the current and available versions side by side.
Step 5: Uninstall Packages
Remove packages you no longer need with choco uninstall:
choco uninstall notepadplusplus -y
Chocolatey runs the application’s uninstaller silently and removes the package from its tracking. To remove a package and all its dependencies that are not required by other packages:
choco uninstall notepadplusplus -y --remove-dependencies
The --remove-dependencies flag cleans up dependency packages that were only installed because of the removed package.
Step 6: List Installed Packages
View all packages currently managed by Chocolatey on your system:
choco list
The output shows every installed package with its version number:
Chocolatey v2.7.0
7zip 24.09
chocolatey 2.7.0
git 2.48.1
vscode 1.98.2
4 packages installed.
To export your installed packages to a file for backup or migration purposes:
choco export -o packages.config
This generates an XML file that you can use to replicate the same package set on another machine – covered in Step 8 below.
Step 7: Pin Packages to Prevent Upgrades
Pinning locks a package at its current version so choco upgrade all skips it. This is useful when an application must stay at a specific version for compatibility.
Pin a package:
choco pin add --name=nodejs
List all pinned packages:
choco pin list
The output confirms which packages are pinned and at what version:
Chocolatey v2.7.0
nodejs|20.18.0
Remove the pin when you are ready to allow upgrades again:
choco pin remove --name=nodejs
Step 8: Create packages.config for Bulk Installs
A packages.config file defines a set of packages to install together. This is ideal for setting up new developer workstations, standardizing team environments, or rebuilding a machine after a fresh Windows install. If you manage Windows servers, this approach pairs well with tools like Terraform for Windows infrastructure provisioning.
Create a file named packages.config with the following XML structure:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="git" />
<package id="vscode" />
<package id="nodejs" version="20.18.0" />
<package id="python3" />
<package id="7zip" />
<package id="notepadplusplus" />
<package id="firefox" />
<package id="postman" />
</packages>
Install all packages defined in the config file:
choco install packages.config -y
Chocolatey reads the file and installs each package in order. Packages with a version attribute install that specific version; packages without it get the latest available version. Store this file in version control alongside your project so every team member gets the same toolset.
Step 9: Chocolatey in Enterprise Environments
The free open-source edition of Chocolatey works well for individual machines and small teams. For enterprise deployments managing hundreds or thousands of Windows endpoints, Chocolatey offers licensed editions with additional capabilities.
Chocolatey Central Management (CCM)
CCM provides a web dashboard for managing Chocolatey across your organization. Key features include:
- Centralized reporting of installed packages across all endpoints
- Deployments – push package installs, upgrades, and uninstalls to groups of machines
- Outdated package detection across the fleet
- Integration with Active Directory for computer grouping
Licensed edition features
Chocolatey Business and Pro editions add features that matter in production environments:
- Package Internalizer – download packages and their resources for offline/air-gapped networks
- Package Synchronizer – automatically detect software installed outside Chocolatey and bring it under management
- Package Reducer – reduce disk space usage by removing unnecessary installer files after installation
- Self-Service – allow non-admin users to install approved packages through a managed interface
- Virus Scanning – automatic virus scanning of packages before installation
For organizations already using Windows Server with DNS and Active Directory, Chocolatey integrates naturally into existing infrastructure management workflows.
Chocolatey Commands Quick Reference
The table below summarizes the most common choco commands for everyday use:
| Command | Description |
|---|---|
choco install <pkg> -y | Install a package |
choco uninstall <pkg> -y | Remove a package |
choco upgrade <pkg> -y | Upgrade a package to latest version |
choco upgrade all -y | Upgrade all installed packages |
choco search <keyword> | Search the community repository |
choco list | List locally installed packages |
choco info <pkg> | Show detailed package information |
choco outdated | List packages with available updates |
choco pin add --name=<pkg> | Pin a package to prevent upgrades |
choco pin remove --name=<pkg> | Remove a pin to allow upgrades |
choco export -o file.config | Export installed packages to XML file |
choco install file.config -y | Install all packages from a config file |
choco config list | Show Chocolatey configuration settings |
choco source list | List configured package sources |
Conclusion
Chocolatey brings proper package management to Windows, making software installation, upgrades, and removal as straightforward as apt or dnf on Linux. Combined with packages.config files, you can standardize tooling across teams and automate new machine setups. For an alternative package manager that ships built into Windows 10 and later, check out winget – the Windows Package Manager.
For production and enterprise environments, consider setting up an internal Chocolatey repository to host approved packages, and use Chocolatey Central Management for fleet-wide visibility and deployments.