A long time ago, it was easy to install programs (or applications) on computers. You copied the program files to a directory on the computer’s hard drive, then you ran it from there. It was just that simple. That was in the era when DOS was king.
With the arrival of complex operating systems like the various forms of Unix, and then Windows, though, program installs became more of a chore. While most of the application’s files still went in the program’s own directory, some needed to go in other places, including in (or under) the operating system’s own directory. Special installation programs were used to copy all of the various files into the places they needed to go.
The advent of the Registry in Windows only added to this complexity. Installing a Windows program now meant having to add registry entries for it. Those are inherently harder to manage than program files.
Despite the chaos that might seem to follow from this, there were still consistencies, in the form of specific locations (both for files and in the Windows Registry) that were used and re-used. This was particularly the case for Unix which has files stored in or under /etc, /var, /usr, etc. Patterns developed, in short, which could be repeated among the various applications that one might install.
What’s now called “package managers” were the result of that. These are fixed application installers that take application files (in the form of a “package,”) and deliver their component files where they belong. There are a number of package managers in the Unix world, mostly tied to certain editions of Unix. The various distributions of Fedora Linux, for example, have DNF which is a replacement for the older YUM, whereas the Debian distributions of Linux (which includes Ubuntu) have APT.
While package managers have been part of the Unix world since the late 1990s, they’re a newer innovation for home users. The Homebrew package manager, for example, opened up to wide usage on Mac OS computers in 2013. Microsoft began rolling out its own package manager, often referred to as the command that runs it, “winget,” into Windows in 2020.
Package managers are designed from the ground up to be command-line tools. If you really want to get to know them, you need to be able to open your operating system’s command prompt. (In a moment, I’ll show you how to do that.)
They offer home users two primary advantages: First, they’re a safe way to locate and install software without having to search the Internet for things. You only need to ask the package manager to search its repository, which is safe because that won’t take you to the dark corners of the Web. Second, they’re a central place to keep many applications up to date.
Note, not all applications you might want to install or update can be handled by a package manager. They first must be listed in the package manager’s repository. Fortunately, many of the more common software titles that people tend to want are in the major repositories. Also, Microsoft’s package installer is capable of installing nearly everything that’s listed in their Microsoft Store since almost all of its contents are part of its repository.
As mentioned, this requires opening Comment Prompt or Terminal on Windows:
To find out if a program you’re looking to install is available using Package Manager:
This will return all items in the repository that may be what you’re looking for. For instance, searching for Libre Office returns the following:
What you’re looking for has a “name” of “LibreOffice” and an “ID” of “TheDocumentFoundation.LibreOffice.” Knowing that, the way to install Libre Office is to run:
This will run the installer for Libre Office. Note, in this case you may also wish to install Libre Office’s Help files which require an additional installer; so run:
in order to install that, as well. (This is entirely optional, by the way.)
Similarly, the way to install 7-Zip (a program that reads and creates archive files in multiple formats, including .ZIP format), you’d run:
As with installing software, to do this you’ll need an elevated Command Prompt or Terminal window. You can update any program using this command:
So, to update Libre Office, run:
It really is just that simple.
The real power of Package Manager, though, is its ability — with just one lone command — to update all of the programs on your computer that it can work with. To do that, run:
This will upgrade or update all software that Package Manager can get, and compare, version numbers for.
It’s possible for some programs not to report a version number that Package Manager can detect; to force those to update, run the command with an added switch:
That will install the latest version of any program it finds on the computer, regardless of the version number it finds or if it doesn’t find one at all.
Some programs may throw other kinds of errors. I can’t get into the details of how to deal with all of the other errors you may encounter. But I can suggest at least one way to get Package Manager to update or upgrade a program that does throw an error:
This will not only get the latest version of the program on your computer, it should ensure that Package Manager can update it in the future.
At this point, you probably can guess not only that Package Manager can uninstall a program, but the way it’s done, which is to run:
Prior to that, it’d pay to make sure you’re having it uninstall the proper ID of the program. At any time, get a list of installed applications, using:
This can, of course, be modified to look for a particular program and show only that:
So, to uninstall Google Chrome, for example, run
If you decide to make use of Package Manager often, there are some available guides on the Internet (aside from this page). Microsoft’s own guide (which is kind of clinical, as many of their technical guides are) can be found here: https://learn.microsoft.com/en-us/windows/package-manager/winget/
There are also two guides that search the Package Manager for software titles and will tell you the exact command required to install them:
Either one is useful and can save you time. But more to the point, when it comes to locating software, they’ll save you searching the entire Internet for them (because, instead, they’re searching Package Manager’s repository).
Microsoft created Package Manager as a command-line-only tool, and intends for it to be used that way. However, there’s a free, third-party graphical interface for it, which you may find helpful, if not easier to use. It’s called UniGetUI and can be found here: https://devolutions.net/unigetui/
Note, don’t go to either wingetui[.]com or unigetui[.]com. As noted on the program’s true Web page, those are phony Web sites. This project does have its own Git page (Git being a widely-used developers’ platform), where you may also find the genuine article: https://github.com/Devolutions/UniGetUI
When installing UniGetUI, home users will want to set the following options during installation:
Note, UniGetUI may “see” package managers you may already have incidentally installed, such as one or more Powershell galleries. There should be no need to add any others; home users really only need it to work with Microsoft’s Package Manager (which as noted includes nearly everything in the Microsoft Store).
Once installed, UniGetUI uses the package managers it’s found to retrieve information about applications on your PC, and then use them to keep them all up to date.
My advice to home users running UniGetUI is to set it as follows (to get into its settings, click the little “Settings” gear in the lower left of its window):
You can install applications from within UniGetUI. Just open it up, then enter all or part of the program name in the “Search for packages” box at the top of the window; or click on the globe at upper left and search in the giant box in the middle of the window.
Looking for updates to your already-installed software is as easy as clicking the interlocking-arrows button near the upper left of the window.
Having covered Package Manager (aka winget) on Windows, it’s time I address Mac users. Program installation on Mac OS remains relatively simple in most cases. A lot of applications are installed simply by copying the application file (or files) to the Mac’s Applications folder (or directory) in Finder. Processes are embedded in the operating system to add any required system preference information into the OS, either during this copy process, or the first time the application is started.
Even so, some Mac applications are complex and require their own installers to run because they have components that must be installed in various locations. These usually are in the form of files ending in .pkg or .mpkg. This means application management is still required, making package managers useful on Mac OS.
At this time, and unfortunately, Apple doesn’t directly include any package manager in Mac OS. It’s currently unknown if Apple plans to release one of their own, either. There is, however, a free and open source package manager for Macs, called Homebrew. To use it, you’ll first need to install it:
That will get Homebrew installed on your Mac for you to use, in the future.
Note the terminology associated with Homebrew is based on a “beer” metaphor. Applications are either “bottles” or “casks” depending on their nature. The basic command you use in Terminal is “brew.”
Based on this fun nomenclature, the way to use Homebrew to install Firefox (for example) on your Mac, is:
All the software titles (“formulae”) that can be installed using Homebrew, can be found on the Homebrew Web site: https://formulae.brew.sh/
From this page you can either open up a full list of titles, or search for a program name. For that matter, the Homebrew home page also has its own search box (at the top).
Just like Microsoft’s Package Manager, Homebrew can upgrade all the software it’s aware of that’s installed on your Mac. It can be done in the form of a single (compound) command, in Terminal:
I call this a “compound” command because it’s a sequence of them, separated by double ampersands. It first updates the Homebrew package manager itself; updates all “bottles” or “formulae” it finds; updates all “casks” it finds; then it cleans up its own repository, logs, etc.
Uninstalling a program using Homebrew is virtually the same as installing it. In Mac OS Terminal, run brew list, or brew list <all or part of program name>, to find the exact package name for what you wish to remove.
Then, run brew uninstall <package name> to remove it. It’s just that simple.
As it turns out, the best guide to using Homebrew is the Homebrew home page, so if you own a Mac and intend to keep using Homebrew to manage its programs, be sure to bookmark that site in your browser.