This is part of a series on moving from desktop Linux back to Windows.
Windows software management: the current default state
Three years ago, I wrote about moving from Windows to Linux for personal computing and development. Part of my frustration with Windows was around package management — installing, keeping up to date, and removing software. And part of my motivation for experimenting with moving back to Windows is the existence of what appears to be a serviceable solution for package management on Windows: Chocolatey. More on that soon.
But first, let’s talk the current state of installing and keeping software up to date on the main modern operating systems for consumer use.
Linux effectively makes package management a first-class citizen; Mac doesn’t, but homebrew has become de facto package management for Mac, at least for a developer machine.
For the devices we use for most of our personal computing — the little super-computers in our pockets — we’ve come to expect that software is installed from one place, automatically updated, and simple to remove. Even in the wild and woolly world of Android, you get all your software from Google Play; it’s rare to be downloading and installing .apk files from the Internet.
Yet we continue to suffer this craziness on Windows. If you’ve used Windows for a long time — and especially if you’ve used Windows exclusively — this is probably your software install/update experience:
- download an executable (.exe, .msi) from the Internet
- click it to install
- maybe change its install location but probably not
- to update… do the same things
- over, and over, and over
If you’ve done this long enough, it might even seem sane, reasonable, no big deal.
But I’ll tell you this: after working on Linux and Mac for enough years, that process above drives me f**king crazy and I want to do it as little as humanly possible.
Installing & Updating Software on Linux and Mac
Let’s say you want to install a recent version of PostgreSQL; or Python; or Redis; or Intellij IDEA; or Docker; or &tc… In Windows, you’d do the thing you do above.
But on Mac, you’d probably use homebrew. You’d install homebrew once; and then from a terminal you’d
brew install redis. Or
brew install docker. You get the picture. To update, you’d use brew to update:
brew upgrade redis. Or
brew upgrade docker. Or to update all just
brew update; brew upgrade. Easy peasy. No “go out to the Internet and download/click things” nonsense.
On Linux, it’s about the same. Depending on the variant, it might be
apt install redis or
yum install redis. To update:
apt update redis or just
apt update to update all.
This is the typical experience. Sure, on both, you sometimes need to go out to the internet and download a thing. But that’s the exceptional case. And, yes, keeping that software up to date is often just as much of a hassle as it is on Windows, which is why you try to avoid that as much as possible
Aside from the huge (to me) benefit of being able to easily update all software with a few commands, there’s also the benefit of being able to see all the software you have installed on your system in a single place.
Regrettably, perhaps until you actually see that stuff in action, you might not realize just how incredible it is. My experience with several years on Ubuntu is that it is so brain-dead easy to keep software up to date that it’s practically more difficult not to. If you believe that up-to-date software generally results in a more secure, reliable system, then Ubuntu makes the right thing to do the easy thing to do.
On Windows, there has existed for several years a similar method for installing, listing, and updating software: Chocolatey. If you checked it out a few years ago and thought, as I did, “it’s just not there yet”… it’s there now. Or, at least, it’s come a loooong way.
As of this writing, there are over 5000 packages available via Chocolatey.
If you read my last post giving props to Jessie Frazelle, and if you checked out her boxstarter file, you see lines like this:
choco install Microsoft-Hyper-V-All -source windowsFeatures choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures choco install sysinternals -y choco install googlechrome
Once installing Chocolatey, from powershell or cmd, you can search for packages with
choco search [string]; install with
choco install [package]; uninstall with
choco uninstall [package]; upgrade with
choco upgrade [package]; upgrade all with
choco upgrade all. And much much more.
You can see all your Chocolatey-installed packages with
choco list -l and you get nice output like this:
PS C:\Users\marc> choco list -l Chocolatey v0.10.8 7zip.install 22.214.171.12470506 avastfreeantivirus 17.9.3761.0 baretail 126.96.36.19920226 chocolatey 0.10.8 chocolatey-core.extension 1.3.3 ConEmu 188.8.131.52 DotNet4.5.2 184.108.40.20640902 Firefox 57.0.2 gimp 220.127.116.1171021 git 18.104.22.168 git.install 22.214.171.124 golang 1.9.2 GoogleChrome 63.0.3239.84 notepadplusplus.install 7.5.3 spotify 126.96.36.1998 sysinternals 2017.12.13 visualstudiocode 1.18.1 windirstat 188.8.131.5261210 18 packages installed.
All Chocolatey-installed software is registered as usual with Windows and so they show up in “Apps and Features” as well.
And, as demonstrated in Jessie’s boxstarter file, you can also install Windows features such as Windows Subsystem for Linux 😍. It’s a darn comprehensive tool.
In short: I like Chocolatey and will use it whenever possible.
Note: This section has been edited, after figuring out the problem. I’m keeping these problems in here, though, in the very unlikely case anyone else stumbles across this behavior.
I had initially observed 2 problems with Chocolatey:
- it hadn’t worked, for me, for installing “big” software (eg Intellij IDEA, Docker for Windows)
- it was pretty slow, at least compared with homebrew or apt/yum, and downloading packages even of small size seemed to take a long time
Turns out, the cause of both of these problems was IPv6 settings in my wireless router. There was nothing wrong with Chocolatey. I wrote about how I resolved Chocolatey / Powershell slowness via fixing my router’s IPv6 settings.
Chocolatey seems to be the only game in town for sane package management on Windows. I’m grateful that it exists, I like it, and I’m happy to use it. If you’re on Windows, I encourage you to give it a shot.
Next post: Small, fuzzy apps and compatibility settings