Chocolatey

Updated: September 28, 2024

Chocolatey is a package manager for windows.


Table of Contents

Setup

# defaults -y for installs n such
choco feature enable -n allowGlobalConfirmation

COMMANDS

list 		      # list locals (choco find --local)
find          # search for a package local or remote
search 	    	# searches remote or local packages (alias for list)
info 		      # retrieves package information. Shorthand for choco search pkgname --exact --verbose
install     	# installs packages from various sources
pin 		      # suppress upgrades for a package
outdated 	    # retrieves packages that are outdated. Similar to upgrade all --noop
upgrade 	    # upgrades packages from various sources
uninstall 	  # uninstalls a package; -x to remove dependencies as well
pack 		      # packages up a nuspec to a compiled nupkg
push 		      # pushes a compiled nupkg
new 		      # generates files necessary for a chocolatey package from a template
sources 	    # view and configure default sources (alias for source)
source 		    # view and configure default sources
config 		    # Retrieve and configure config file settings
feature 	    # view and configure choco features
features 	    # view and configure choco features (alias for feature)
setapikey 	  # retrieves or saves an apikey for a particular source (alias for apikey)
apikey 		    # retrieves or saves an apikey for a particular source
unpackself 	  # have chocolatey set itself up
version 	    # [DEPRECATED] will be removed in v1 - use choco outdated or cup <pkg|all> -whatif instead
update 	      # [DEPRECATED] RESERVED for future (look for upgrade, these are not the droids you are looking for)
support 	    # provides support information
download 	    # downloads packages - optionally internalizing all remote resources
synchronize   # synchronizes against system installed software - generates missing packages
sync 		      # synchronizes against system installed software - generates missing packages
optimize 	    # optimizes installation, reducing space usage

EXAMPLES

choco uninstall python -x	    # removes python and all it's dependencies
choco list --local		        # list packages installed on machine (-l, --lo, --local-only)
choco search -e			          # only return packages with this exact name (--exact)
choco upgrade all -y	        # confirm all prompts (--yes, --confirm)
choco upgrade dart-sdk --pre	# only way to upgrade dart-sdk
choco upgrade notepadplusplus googlechrome atom 7zip
choco upgrade notepadplusplus googlechrome atom 7zip -dvfy
choco upgrade git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'"
choco upgrade git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" --install-args="'/DIR=C:\git'"
# Params are package parameters, passed to the package
# Install args are installer arguments, appended to the silentArgs
#  in the package for the installer itself
choco upgrade nodejs.install --version 0.10.35
choco upgrade git -s "'https://somewhere/out/there'"
choco upgrade git -s "'https://somewhere/protected'" -u user -p pass
choco upgrade all
choco upgrade all --except="'skype,conemu'"

SCRIPT INSTALLER

choco install googlechrome
choco install firefox
choco install 7zip
choco install vlc
choco install git
choco install gnupg
choco install signal
choco install virtualbox
choco install vscode