Infrastructure

How to Install Chocolatey on Windows: Complete Setup Guide

Install Chocolatey with one PowerShell command, verify it, and manage software from the command line. The official 2026 install one-liner plus a command cheat sheet.

By InventiveHQ Team

To install Chocolatey, open PowerShell as Administrator and run a single command: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')). That downloads the official bootstrap script from community.chocolatey.org, installs Chocolatey to C:\ProgramData\chocolatey in about a minute, and gives you a command-line package manager for Windows. Verify it with choco --version, then install any app with choco install <name> -y.

That is the summary an AI Overview gives you. Here is what it can't: the exact command still works in 2026, but the commands you run afterward changed in Chocolatey CLI v2.0 (choco list no longer searches the web, and --local-only is deprecated), the install needs an elevated shell for a specific reason, and a good package workflow is more than install — it's search, upgrade, pin, and cleanup. This guide walks the full loop with a current command cheat sheet.

Built on the robust NuGet infrastructure and powered by PowerShell, Chocolatey streamlines software deployment for developers, system administrators, and power users. No more hunting for installers or clicking through setup wizards — just simple commands that get the job done.

The install-to-package flow at a glance

Chocolatey install flow: install, verify, then install a package Three-step flow. Step 1: run the PowerShell one-liner as administrator to install Chocolatey. Step 2: verify with choco --version. Step 3: install any package with choco install name -y. An amber dot travels along the connectors to show progression. Run PowerShell as Administrator 1 Install Set-ExecutionPolicy Bypass -Scope Process iex ... install.ps1 2 Verify choco --version reopen PowerShell first 3 Install a package choco install googlechrome -y

System Requirements

Before installing Chocolatey, ensure your system meets these minimum requirements:

  • Operating System: Windows 7+ or Windows Server 2003+ (Chocolatey CLI v2 officially supports Windows and Windows Server versions still in Microsoft support)
  • PowerShell: Version 2.0 or higher
  • .NET Framework: 4.8 or higher (auto-installed by the bootstrap script if missing)
  • User Permissions: Administrator access required for the standard install

Pro Tip: Most modern Windows systems already meet these requirements. The installation script automatically handles the .NET Framework dependency if it is not present.

Installing Chocolatey

Step 1: Open Elevated PowerShell

Chocolatey installs machine-wide to C:\ProgramData\chocolatey, so it needs administrator rights. Launch an elevated PowerShell window:

  • Click the Start menu or press the Windows key
  • Type "powershell" in the search box
  • Right-click on "Windows PowerShell" (or Terminal)
  • Select Run as administrator from the context menu
Advertisement

Step 2: Execute Installation Command

Copy and paste this command — the exact one published on chocolatey.org/install — into your elevated PowerShell window:

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

Press Enter and wait for the installation to complete. The process typically takes 30–60 seconds depending on your internet connection.

Why Set-ExecutionPolicy Bypass -Scope Process? Windows blocks unsigned scripts by default. The -Scope Process flag lifts that restriction only for the current PowerShell window — it never touches your machine's global execution policy, and it resets the instant you close the window. This is the officially recommended, minimally-scoped way to let the bootstrap script run once.

Step 3: Verify Installation

Close and reopen PowerShell (so the updated PATH is loaded), then confirm Chocolatey is installed:

choco --version

You should see a version number (for example, 2.x.x). You can also run choco -? to display the full help and available commands.

Common Chocolatey Commands (2026 cheat sheet)

These are the commands you will use daily. Run them in an elevated PowerShell window. Note the v2.0 behavior change: choco list now shows only installed packages, and choco search queries the online repository.

TaskCommandNotes
Install a packagechoco install googlechrome -y-y auto-confirms; install several: choco install git vscode 7zip -y
Search the repositorychoco search firefoxAlso choco find; queries community.chocolatey.org
List installed packageschoco listv2.0+: local only. --local-only is deprecated — drop it
Upgrade one packagechoco upgrade git -yUpdates a single package to the latest version
Upgrade everythingchoco upgrade all -yUpgrades every Chocolatey-managed package
Uninstall a packagechoco uninstall firefox -yRemoves the package and (usually) its software
Pin a versionchoco pin add -n=gitExcludes the package from upgrade all; choco pin list to review
Package infochoco info googlechromeVersion history, dependencies, description
Check for updateschoco outdatedLists packages with a newer version, changes nothing

Finding and Searching Packages

Chocolatey offers two convenient ways to discover available packages.

Search the community repository directly from PowerShell:

choco search firefox
choco search git
choco search vscode

In Chocolatey CLI v2.0 and later, choco search (also choco find) is the command that queries the online repository. Do not use choco list for this — since v2.0 choco list returns only the packages already installed on your machine.

Browse packages visually through the official Chocolatey Community Repository, which provides detailed package information, version history, and installation instructions.

Best Practice: Use the web gallery to research packages and their dependencies, then use command-line search for quick lookups during installation.

Installing Software Packages

Once you've identified the packages you need, installation is straightforward. Always run these commands in an elevated PowerShell window.

Basic Installation Examples

Install Google Chrome with automatic confirmation:

choco install googlechrome -y

Install Mozilla Firefox:

choco install firefox -y

The -y flag automatically confirms the installation, skipping manual prompts. Without this flag, Chocolatey asks for confirmation before proceeding. You can install several packages in a single command by listing their IDs: choco install git vscode 7zip -y.

Automation Integration

For Puppet automation environments, integrate Chocolatey packages using this syntax:

package { 'firefox':
  provider => 'chocolatey',
  ensure   => 'latest',
}

This integration enables automated software deployment across multiple systems using infrastructure-as-code principles.

How Chocolatey Works

Understanding Chocolatey's workflow helps you appreciate its efficiency and reliability:

  • Package Discovery: Chocolatey connects to the online repository to find your requested package
  • NuGet Download: The package definition (NuGet .nupkg format) is downloaded to your system
  • Installer Retrieval: Chocolatey fetches the actual software installer from the official vendor URL (or uses an embedded installer for internalized packages)
  • Silent Installation: The installer runs in silent mode, requiring no user interaction
  • Verification: Installation success is verified and registered in Chocolatey's local package database

This process ensures you get authentic software directly from vendors while maintaining the convenience of command-line installation.

Security Note: Community packages are moderated and checked against VirusTotal, and most point to official vendor download URLs. Still, they are community-maintained — verify package trustworthiness and consider internal/private repositories before using them in production environments.

Post-install checklist

Run through this once after installing Chocolatey to confirm a healthy setup:

  • choco --version returns a version number (v2.x expected in 2026)
  • You reopened PowerShell after install so choco resolves on the PATH
  • You are running commands in an elevated (administrator) window
  • Test install works: choco install 7zip -y succeeds
  • choco list shows the package you just installed
  • choco outdated runs without errors (baseline for future upgrades)
  • choco doctor reports no configuration problems
  • Optional: pin anything you don't want auto-upgraded with choco pin add -n=<name>

System Maintenance Commands

Keep Chocolatey and your installed software healthy:

# Check for outdated packages
choco outdated

# Upgrade everything that has a newer version
choco upgrade all -y

# Get package information
choco info googlechrome

# Diagnose configuration problems
choco doctor

Regular maintenance using these commands keeps your system current and ensures optimal Chocolatey performance. Pair choco outdated (to preview) with choco upgrade all -y (to apply) as a simple weekly patch routine.

Frequently Asked Questions

What is the official command to install Chocolatey?

Open PowerShell as Administrator and run a single line: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')). This is the exact command published on chocolatey.org/install. It temporarily allows the install script to run for that one PowerShell session, downloads the bootstrap script from the official community repository, and installs Chocolatey to C:\ProgramData\chocolatey. It takes roughly 30 to 60 seconds. When it finishes, close and reopen PowerShell so the updated PATH takes effect.

Do I need administrator rights to install Chocolatey?

Yes for the standard install. Chocolatey installs to C:\ProgramData\chocolatey and manages machine-wide software, so it needs an elevated (Run as administrator) PowerShell window. If you cannot get admin rights, Chocolatey supports a non-administrative install to a per-user folder, but it is more limited — some packages that require elevation to install their software will still fail. For most people, the right answer is to open PowerShell as Administrator and use the standard one-liner.

Why does the install command use Set-ExecutionPolicy Bypass?

By default Windows blocks unsigned PowerShell scripts from running. Set-ExecutionPolicy Bypass -Scope Process -Force lifts that restriction only for the current PowerShell process — it does not change your machine's global policy, and the setting disappears the moment you close that window. That scoping is deliberate: it lets the Chocolatey bootstrap script run once without weakening security for the rest of the system. If you prefer, you can use -ExecutionPolicy Bypass on a fresh powershell.exe call instead.

How do I install a package with Chocolatey?

Run choco install <packagename> -y in an elevated PowerShell window. For example, choco install googlechrome -y or choco install git -y. The -y flag auto-confirms the prompts so the install runs unattended. Find the exact package ID by searching the community repository with choco search <name> or by browsing community.chocolatey.org/packages. You can install several at once: choco install git vscode 7zip -y.

What is the difference between choco list and choco search?

In Chocolatey CLI v2.0 and later, choco list shows only the packages installed on your machine, and choco search (or choco find) queries the online community repository for packages you could install. This is a change from v1, where choco list searched the remote repository and needed a --local-only flag to show installed packages. The --local-only flag is now deprecated and should be removed from scripts — plain choco list already lists local packages.

How do I update all Chocolatey packages at once?

Run choco upgrade all -y from an elevated PowerShell window. This checks every Chocolatey-managed package for a newer version and upgrades the ones that have one, auto-confirming with -y. To see what is outdated first without changing anything, run choco outdated. Note that Chocolatey only upgrades software it installed — apps you installed manually outside of Chocolatey are not tracked.

How do I uninstall Chocolatey or a package?

To remove a single package, run choco uninstall <packagename> -y. To remove Chocolatey itself, delete the installation folder — by default rmdir /s /q %ProgramData%\chocolatey from an elevated command prompt — and remove the ChocolateyInstall environment variable and its bin folder from your PATH. Uninstalling Chocolatey does not remove the software it installed; uninstall individual packages first if you want them gone.

How do I stop Chocolatey from upgrading a specific package?

Pin the package with choco pin add -n=<packagename>. A pinned package is skipped by choco upgrade all, which is useful when a newer version would break something or you need to hold a specific version. Run choco pin list to see what is pinned, and choco pin remove -n=<packagename> to unpin it later so it can upgrade again.

Is Chocolatey safe and are the packages trustworthy?

Chocolatey packages on the community repository are moderated and most point to the official vendor download URL rather than bundling the installer, and packages are checked against VirusTotal. That said, they are community-maintained, so in production you should verify a package's source, use internal/private repositories for critical software, and consider Chocolatey's package internalization features. For a single workstation, sticking to popular, well-maintained packages (googlechrome, git, vscode, 7zip) is low risk.