Windows users often get infected with viruses 🦠 because they use the bad approach of installing new programs by opening web pages and 🖱️clicking on links to download programs, first we go to the website of that program, navigate to the downloads section and download an executable installer and finally run it. While this approach works most of the time, it does have its downsides and there is a better way that I’m going to show you today.
🍫 Chocolatey is the solution for Windows users
According to (chocolatey.org, 2023) “Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages.”
In other words Chocolatey is a package (program) manager for Windows Operating System and it’s supported on devices that have Windows 7+
To find your package you can go to packages page and find your package or search on your command line
choco search chrome
choco search git
A more advanced example from Chocolatey of how to search
And now install any package with the install command
choco install googlechrome
choco install git
To uninstall
choco uninstall googlechrome
choco uninstall git
To list outdated packages:
choco outdated
Chocolatey runs automated tests to check for viruses and bugs, also with Chocolatey you can update all your packages with one command:
choco upgrade all -y // the -y flag is for "yes" to accept any prompt automatically
// or upgrade only one package with:
choco upgrade git
Package managers are very powerful automation tools that every IT/Sys Admin should be using, it’s more secure and fast. Think about the number of programs you have on your computer at the moment, how can you make sure they are up-to-date and secure? Doing them manually is a tedious task, or when you’re an IT admin and want to install the same program(s) on a fleet of devices, a simple PowerShell script with Chocolatey will save you hours in doing a repetitive task.
You can watch the following video from Chocolatey team to know more about it and its goal:
Most GNU/Linux 🐧and some MacOS users already have been using package managers for a very long with apt for Debian based distros, pacman for Arch based users and Homebrew for MacOS users and the usage is very similar to Chocolatey.