This tutorial explains frequently used commands for managing packages in Windows.

  • To list all installed packages

It shows list of all installed packages along with their version number. it shows all the packages that was installed with chocolatey tool.

choco list

if you want to show only list of installed packages for a given source.

PS C:\WINDOWS\system32> choco list
Chocolatey v2.1.0
dart-sdk 3.2.2
python311 3.11.4
  • To install packages

This command isntall the package on windows


choco install package [options]

Options are optional.

-y or --yes: This option allows yout accept yest for prompt confirmation for installation. --version versionnumber: Tell the specific package version number to install --source sourceurl: Give the source to install the package from a source url

You can also install multiple packages in a single command

choco install package1 package2

also, if you are getting errors, you can force install using --force-dependencies.

choco install firefox --force --force-dependencies

--force-dependencies: It install or uninstall the package dependencies forecefully

  • To upgrade packages

this command used to upgrade the package to latest version. You can use upgrade one or more packages to upgrade it.

choco upgrade package
choco upgrade package [options]

Following options -y or --yes: This option allows yout accept yest for prompt confirmation for installation. --version versionnumber: Tell the specific package version number to install --source sourceurl: Give the source to install the package from a source url

To upgrade all package to latest version

choco upgrade all
  • To uninstall packages
choco uninstall package -y

option -y is optional, Without this opiton, It ask confirmation whether to proceed or not for uninstall.

By passing this option, It uninstall the package without asking for confirmation Example:

PS C:\WINDOWS\system32> choco uninstall nano-win -x
Chocolatey v2.1.0
Uninstalling the following packages:
nano-win

nano-win v7.2.36
 Skipping auto uninstaller - No registry snapshot.
 nano-win has been successfully uninstalled.

Chocolatey uninstalled 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  • How to downgrade specific version

Sometimes, we need to downgrade specific version of package to lower version

Steps to downgrade version

  • First Check installed version using choco list package, It gives version installed.

  • Then use choco uninstall package to uninstall the package

  • Finally use choco install virtualbox --version 1.2.1 to downgrade the package

  • Check if package version is downgraded using choco list package , and checks version

  • Installation chocolateygui Choco is an Command line interface for managing packages in Windows.

It also provides gui tool to manage packages Run below command to install

choco install chocolateygui