Use Package Managers for Easier Tool Management

Every software engineer has a number of tools on their computer at any given time. Having the right tools can boost your software engineering career. In this article, I'll take a look at two of my favorite package managers to manage all the tools on my machines- Homebrew and Chocolatey.

Homebrew and Chocolatey package manager tools
Homebrew and Chocolatey package manager tools

Every software engineer has quite a number of tools on their computer at any given time.  Whether you are on a Mac (and Linux) or a Windows machine, you are always using numerous tools and playing with even more. After all, having the right tools and being aware of what's available is important to boosting your software engineering career. In this article, I'll take a look at two of my favorite package managers to manage all the tools on my machines- Homebrew on the Mac and Chocolatey on Windows.

What Is A Package Manager?

What is a package manager? Package managers simplify your task of managing the installation, upgrade, and uninstallation of the various software on your computer. As you will see, this can be applications like browsers or image editing software, languages like Python, run-times like Node.js, and much more. Package managers like Homebrew and Chocolatey are based generally on the nuget package concept.  They are in some ways compatible with nuget packages but in other ways not.  Each package manager has very large public domain databases of literally millions of packages to choose from.

When installing software, package managers make it easy to do command-line installs with little or no intervention. Want to avoid the "drag this icon..." activity when installing software on a Mac?  Gone. Want to install software on Windows with one command rather than downloading from a web site and running an msi file? No problem.

Upgrading software is much easier too. With package managers, you can use one command to upgrade all software you have installed rather than having to manually do each one. It's also easy to control specific version installs and upgrades, like we often do as software engineers when using certain tool or language versions.

And uninstalling is also a snap.  One command can uninstall a piece of software right from the command line.  Easy and quick.

As a software engineer, I've used two package managers time and again - Homebrew on the Mac and Chocolatey on Windows. Let's review each one next.

HomeBrew

Homebrew (https://brew.sh) touts itself as the tool that "installs the stuff you need that Apple (or your Linux system) didn't." As a software engineer, I use brew almost every day to keep the software on my mac up to date. Homebrew is easy to install, easy to use, and always works. Homebrew is free for personal use.

Once Homebrew is installed, there is an easy short-list of commands that do 90% of the things I need to do even though Homebrew can do much more. These core commands  I use are:

  • brew list - list what I have installed locally
  • brew search <formula> - list what is available online
  • brew install <formula> - install the specified formula
  • brew upgrade <formula> - upgrade specific or all installed formula
  • brew uninstall <formula> - uninstall specific formula

Want to install Firefox and use it as a test browser? Literally just:

  1. type "brew install firefox" at a bash prompt and wait for it to install
  2. you have it- run Firefox

Want to install the latest version of Python? Just as easy:

  1. type "brew install python" at a bash prompt and wait for it to install
  2. you have it- and it even updates your PATH variables as necessary

Need to update Firefox? Both Firefox and Python?

  1. type "brew upgrade" and it will upgrade everything you have installed

As a software engineer who works on a Mac (and Windows), I highly recommend checking out Homebrew. It's a great package manager for managing all the tools and software we use on our Macs.

Chocolatey

Chocolatey (https://chocolatey.org) is a package manager for Windows. Chocolatey attempts to "simplify complex processes, save time & effort" when it comes to managing software on Windows.  It has commercial versions that are popular in many DevOps shops.  But the free personal version is great as well. I use it on my Windows machines to install, upgrade, and uninstall quite a number of the tools and software I use as a software developer. Chocolatey is free for personal use.

Chocolatey is similar to Homebrew and also based on the general nuget package concept.  It also has a very large database of packages to choose from.  And, with Chocolatey (using the 'choco' command line interface on Windows), I still have an easy short-list of commands that do 90% of the things I need to do even though Chocolatey can do much more. These core commands I use are:

  • choco list --localonly - list what I have installed locally
  • choco find - search remote or local packages
  • choco install - install package
  • choco upgrade - upgrade specific package
  • choco uninstall - uninstall specific package

Using the same examples as before... wWant to install Firefox and use it as a test browser? Literally just:

  1. type "choco install firefox" at a command prompt and wait for it to install
  2. you have it- run Firefox

Want to install the latest version of Python? Just as easy.  We will run the command to list current Python installs just to do it:

  1. type "choco list --localonly" and verify Python package isn't already installed
  2. type "choco install python3" at a command prompt and wait for Python3 to install
  3. you have it- and it even updates your PATH variables as necessary

Need to update Firefox? Both Firefox and Python?

  1. type "choco upgrade firefox" to upgrade just that, or "choco upgrade all" to upgrade everything (note you will likely need to run from an elevated command prompt)

Oh and choco works from command prompts and from powershell too!

I Recommend Homebrew and Chocolatey

As a software engineer, I have a lot of different tools, software, and languages on my Mac and Windows machines. At any given time I have at least 3 browsers, multiple image editing tools, multiple open source databases, and at least 4 different languages. Package managers make it much easier to keep all this software up to date, and I definitely recommend checking out Homebrew and Chocolatey.  They will make your life a lot easier and help you focus your time better.

💡
Have you checked out my career booster course?
Click Here for more info and how to watch a free video preview.