Understanding Package Management on Windows

Francisco Navarro

Francisco Navarro

Read more posts by this author.

One of the most common tasks of any Windows system administrator is managing software. Sysadmins have to deal with all kinds of software such as operating system patches, line of business applications and more. You could get used to the click, click, click approach of installing and removing software or you could do it the easy way with a Windows package manager!

In this article, you’re going to learn how package management works in Windows and a few different tools you can use to master software management in your environment.

If you’re not already using some kind of Windows package manager, take note of the following benefits of package management.

  • Simple to find available software
  • Simple to find available software by specific version
  • Simple to verify if any software dependencies exist
  • Simple to verify the integrity of the software by checking for corruption or tampering
  • Simple to remove software in its entirety ensuring any lingering files get cleaned up
  • Simple to upgrade software by installing new versions and removing old ones
  • Ability to downgrade software back to a previous version
  • Easily install and remove entire groups of software packages at once

Do any of these statements sound interesting? If so, read on. You need to be introduced to package management!

Understanding Package Management Terminology

Before you can truly understand what package management in Windows is all about, you should first have a basic understanding of the terminology. When reading about package management, you’ll commonly see references to three primary terms; packages, repositories and clients.

Software Packages

To standardize and automate software management using package management, it’s first important to understand a core concept called the package. A software package is the software itself along with any related information like documentation, version, author, etc. In a nutshell, the package contains everything that’s required to install and remove a particular piece of software.

For example, a package can contain items such as:

  • Software binaries
  • Installation instructions
  • Metadata such as author, version, and required dependencies.

Repositories (Repos)

Packages need to be stored somewhere for retrieval later. Packages are stored in repositories or repos.

A repo is a collection of packages hosted on a remote server. The repo stores all of the packages intended for distributing, installing and updating. Think of a repo is a central server storing packages like individual file folders.

Clients

To download and install a package from a repo, computers need a client. A package manager client is software installed on a computer that knows how to find packages in various repos and how to download, install, manage and uninstall packages.

Common Linux Package Managers

Package management in Linux has been commonplace for a long time. It’s something that Microsoft has recently began to learn from for the past few years.

If you have worked with Linux distributions, you may notice various package manager clients. For example, Ubuntu includes a dedicated tool called Ubuntu Software as shown below. As you can see in the below screenshots, using this client, you can reach out to various repos and easily install various pieces of software.

Available software repos in Linux
Available software repos in Linux
Updating software in Ubuntu
Updating software in Ubuntu

The GUI Ubuntu software package management client also has a brother on the command-line called Advanced Package Tool (APT). This client performs the same basic concepts but via the command-line.

You can see in the screenshot below the use of the common Linux package client called apt. Apt is a common package manager client in Linux that allows you to work with compatible repos. In the below screenshot, you can see some example usage of using apt.

Using the apt package manager
Using the apt package manager

For example, in an Ubuntu terminal, typesudo apt list —installed. You will then see all of the packages that are installed on the local system as shown below.

All apt packages already installed
All apt packages already installed

The apt package manager client can do a lot more. Be sure to check out this informative article on apt if you’re interested in learning more.

Using package management makes for an efficient way of handling software on Linux but you’re a Windows guy/gal, what’s in it for you?

Windows and Package Management

Package management on Windows hasn’t been the best experience for a long time. Traditionally, Windows sysadmins only had a couple of options such as:

  • Unzipping raw content and run the .exe files
  • Installing an application encapsulated in a Windows installer file (MSI)

These methods of software deployment and installation were error-prone with no real standardization. These methods didn’t scale well and didn’t lend themselves to managing the entire software lifecycle.

To introduce package management to Windows, Microsoft introduced a few different options like:

When introduced, these technologies provided many advantages over using nothing all. They were able to deliver packages similar to how Linux did. However, there were some downsides mainly complexity and overhead.

To that end, third-party configuration management tools such as Puppet, Chef, Ansible were introduced but weren’t necessarily designed for managing software. These configuration management tools were more designed for managing general configuration items.

So is there a package management solution outside of deploying GPOs and using SCCM? Why, Yes! Various third-party tools popped up to fill the gap. One of the most popular tools is called Chocolatey.

You can read all about how to get started with Chocolatey here.

Summary

In this article, you learned the basics of package management and package management on Windows. Although this article covered the basics, there’s a whole lot more to this area than what we could cover here. If you’re interested in learning more about package management on Windows, I encourage you to check out Chocolatey and another article posted here called NuGet and IIS on Windows Server.

Subscribe to Adam the Automator

Get the latest posts delivered right to your inbox

Looks like you're offline!