DEV Community

loading...
Cover image for Chocolatey vs. Scoop: Package Managers for Windows

Chocolatey vs. Scoop: Package Managers for Windows

bowmanjd profile image Jonathan Bowman Updated on ・3 min read

Install both Chocolatey and Scoop. (I just put the "vs." in there as clickbait.) They make installing and managing software on Windows so much easier. They are different tools, though, and I suggest that their usage depends on the scenario.

In the Linux world, there are apt, yum, dnf, pacman, and many others. In Mac and Linux, there is brew. For Windows, there are two: choco and scoop. They manage software from the PowerShell command-line. (So... there is also winget. It may soon be a worthy addition to this article.)

Enable execution of PowerShell scripts

For both of these tools, you will need to set the PowerShell Execution Policy to something more permissive than "Restricted." Here is my suggestion: be strict with the scope of LocalMachine, and only slightly more permissive with the CurrentUser scope. So, first launch PowerShell as Admin (I use ⊞-x then select "Windows PowerShell (Admin)") and run

Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

The first line means that all scripts and configuration files on this computer must be signed by a trusted publisher, even if you write them yourself. This is pretty strict.

The second line means that all scripts and configuration files downloaded from the Internet must be signed by a trusted publisher, but scripts you write yourself will work, for the current user. This policy will "win" when you are logged in.

Chocolatey: conventional install locations, as Admin

Chocolatey can install from a community repository with thousands of packages. In general, installing one of these packages, such as Google Chrome, will require elevated Admin privileges, and will install it where you would expect (likely C:\Program Files\ or C:\Program Files (x86)\). The applications will have shortcuts in your start menu, and possibly on your desktop.

Chocolatey installation

In an Admin-level PowerShell window, the following should work, provided you have set the ExecutionPolicy as above:

iwr -useb chocolatey.org/install.ps1 | iex
Enter fullscreen mode Exit fullscreen mode

See the detailed installation docs if you have issues with the above.

Chocolatey search

choco search ditto
Enter fullscreen mode Exit fullscreen mode

Chocolatey install package

choco install ditto
Enter fullscreen mode Exit fullscreen mode

Chocolatey upgrade all currently installed packages

choco upgrade all
Enter fullscreen mode Exit fullscreen mode

Chocolatey help

choco -help
Enter fullscreen mode Exit fullscreen mode

Scoop: non-Admin by default, installs in user directory

Scoop is designed for developers who have an affinity for Unix. By default, it installs packages to ~/scoop/ and this is both a strength and a confusion point. Apps will not by default show in the start menu, and if plugins or addons expect to find the installation in a certain directory (looking at you, OBS Studio!), there will be some inconvenience and tedious setup.

If you do not have Admin access to your system (for instance, this is a shared server with Remote Desktop access), then Scoop is the right choice.

Scoop also seems natural for installing command-line tools that you might miss from Unix-like systems, such as Linux or Mac. While some of these tools may be available through Chocolatey, the Scoop ecosystem is designed with such tools in mind.

The Scoop wiki has a nice write-up comparing Scoop and Chocolatey.

Scoop installation

In any PowerShell window, no Admin necessary, the following will install Scoop, provided you have set the ExecutionPolicy as detailed at the beginning of the article:

iwr -useb get.scoop.sh | iex
Enter fullscreen mode Exit fullscreen mode

See the detailed installation docs for more info.

Scoop buckets

I often install the extras bucket immediately:

scoop bucket add extras
Enter fullscreen mode Exit fullscreen mode

A bucket is a set of apps that can be searched and installed. To see all the known community buckets:

scoop bucket known
Enter fullscreen mode Exit fullscreen mode

Then add the ones you like!

Scoop search

scoop search sudo
Enter fullscreen mode Exit fullscreen mode

Scoop install package

scoop install sudo
Enter fullscreen mode Exit fullscreen mode

Scoop upgrade all currently installed packages

scoop upgrade *
Enter fullscreen mode Exit fullscreen mode

Scoop help

scoop help
Enter fullscreen mode Exit fullscreen mode

Enjoy and experiment!

Discussion (6)

pic
Editor guide
Collapse
magnuslongvabouvet profile image
Magnus Longva

Scoop let's you define package repositories (buckets) in a simple JSON format, whereas Chocolatey requires a NuGet v2 feed. Chocolatey imposes a hard request limit to their public repositories, so you can't use it for production without hosting your own repository. If you read this comment and you are looking for a tool to provision software to Windows-machines in a Linux-style manner, save yourself some time and choose scoop.

Collapse
bowmanjd profile image
Jonathan Bowman Author

That is a significant point about production use of Chocolatey. Thank you for mentioning this, as I did not in the article. This is a positive point for Scoop.

There are, of course, various editions of Chocolatey that can help with this, if you have some money to spend.

Collapse
jasonbrown1965 profile image
Jason Brown

Not a developer, more of a wannabe newb. But I did spot another alternative in Reddit discussion: appget.net/

Collapse
bowmanjd profile image
Jonathan Bowman Author

Thanks for noting this! The plot thickens.

As you can see in the GitHub repo, AppGet is shutting down.

Collapse
valsaven profile image
Collapse
krayg profile image
Kray-G

I knew Scoop recently, and it is very useful. I haven't used Chocolatey, but scoop is very good for me. I can recommend it to everybody.