Skip to content

Chocolatey: Windows Package Manager [Installation Guide & Cheatsheet]

By Ashish Pandey

Published: at 02:03 PM

Installing software can be time-consuming. You have to search for the program, download it, and then manually install it, often with unwanted packages bundled in.

To skip these steps, try Chocolatey. It’s a command-line package manager for Windows that makes software management easier. It can install, upgrade, remove, and configure applications, saving you time.

To install and set up Chocolatey on Windows, follow these steps:

1. Open CMD as Admin :

open cmd as admin

2. Install Chocolatey:

Run the following command in the command prompt:

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

3. Verify Installation:

verify installation of chocolatey

4. Usage:

Let’s install GoogleChrome using Chocolatey.

choco install googlechrome ( install google chrome using chocolatey )

If you are unsure about package name, you can check that in https://community.chocolatey.org/packages

If you want a window interface instead of the powershell console, you can do: choco install chocolateygui.

Cheat Sheet

Unlock the full potential of Chocolatey (Choco) with this comprehensive cheatsheet, packed with essential commands and shortcuts to supercharge your software management experience.

Usage

CommandDescription
listlists remote or local packages
searchsearches remote or local packages
inforetrieves package information
installinstalls packages from various sources
pinpins a package to suppress upgrades
outdatedretrieves packages that are outdated
upgradeupgrades packages from various sources
uninstalluninstalls a package

See also the Chocolatey Command Reference for a complete list.

Examples

CommandDescription
Find a package
choco listList all chocolatey packages
choco search zipSearch packages mentionning “zip”
choco search --by-tag compressionSearch packages by their tags
choco search --by-id-only zipSearch packages with “zip” in the package name
choco search --order-by-popularity zipFilter and sort by package results by popularity
choco search --approved-only zipOnly return approved packages
choco info 7zipGet information about 7zip package
Install
choco install 7zipInstall
choco install 7zip --install-directory=P:\7zInstall to a specific directory
Maintenance
choco list --localonlyList installed packages
choco outdatedList upgradable packages
choco upgrade all -yUpgrade all packages
Pinning
choco pin listList pinned packages
choco pin add --name 7zipSuppress upgrades for 7zip
choco pin remove --name 7zipSupress upgrades supression for 7zip ;)

Prefered search method: choco search --by-id-only --order-by-popularity --approved-only searchstring

Other Command line switches

SwitchesDescription
--helpPrints out the help menu.
--install-directory=VALUEInstall Directory Override
-y, --yesConfirm all prompts.
-f, --forceForce the behavior.
--what-ifDon’t actually do anything, simulate.
--execution-timeout=VALUEThe time to allow a command to finish.
--fail-on-standard-errorFail on standard error output (stderr).
--use-system-powershellExecute PowerShell using an external process.
--debugShow debug messaging.
--verboseShow verbose messaging.
--traceShow trace messaging.
--log-file=VALUELog File to output to in addition to regular loggers.
--no-colorDo not show colorization in output.
--limit-outputLimit the output to essential information.
--no-progressDo not show download progress percentages.
--allow-unofficial-buildAllow the use of an unofficial build.

So why wait? Dive into the world of Chocolatey today and revolutionize the way you manage software on Windows. Say goodbye to manual installations and hello to a faster, more streamlined approach with Chocolatey. Your software management journey starts here!

If you have any queries, feel free to contact us on https://discord.gg/RDU62RrFe3