Add, remove, and manage Windows applications from the command line using WinGet, Microsoft's open source package manager.
In the Linux world, package managers catalog and install the software available in a given Linux distribution. Until recently, Microsoft Windows software management wasnβt that centralized. There was a system for adding or removing components for Windows itself, but not for third-party apps. And while we do have the Microsoft Store as an app-management solution, itβs a proprietary system thatβs aimed mainly at consumers, not developers or admins.
WinGet is a Microsoft-authored and -managed open source system for cataloging and managing software installations in Windows. Itβs meant to provide the closest thing we have to an official package management system for Windows thatβs not also a proprietary solution (like the Microsoft Store), focused on one aspect of the Microsoft ecosystem (like NuGet, which is chiefly for .NET components), or a third-party offering (like Chocolatey or Scoop).
Getting started with WinGet
If youβre using Windows 11, WinGet should be available by default, so you wonβt need to install anything. For earlier versions of Windows, you can use the App Installer app from the Microsoft Store to install WinGet.
Once the installer finishes, you should be able to type winget at a command prompt to run it.
How WinGet works
The winget command lets you connect to, by default, a Microsoft-curated repository of software installers. You can search the repository, download installers for the applications you want, set them up, keep track of whatβs installed, and remove applications.
winget itself doesnβt actually install anything. It obtains the application installers and runs them, along with any options you want to provide manually. To that end, you donβt need to run winget itself from an elevated prompt, but the system may prompt you for permissions when winget launches a given application installer.
winget can also work with multiple sources for software installations. The default is Microsoftβs WinGet repository, but you can add other repositories that follow a certain format, or track whatβs already been installed locally, as well.
Basic WinGet commands
The first thing youβre likely to do with winget is search for things to install.
Type winget search <search_term> and winget will look through the currently configured repositories for whatever matches your search term. For instance, winget search Python will search for anything matching the keyword Python, andΒ winget search "SQL Server" looks for anything matching the term SQL Server. (Note that any search term with spaces needs to be set off in quotes.)
Search results list the name of a package, its unique identifier in its repository, optionally a version number, how the match was found (e.g., in the name or the description), and what repository it was found in. The ID column, the unique identifier, lists the name to use when you want to actually install something.
In a search for Python, for instance, one of the matches may be Python 3.11, with the ID Python.Python.3.11. If you want to install that package, youβd use winget install Python.Python.3.11. This would download that package and automatically start the installation process for it.
The same goes for removing a package. You would use winget uninstall <id>Β (e.g.,Β winget uninstall Python.Python.3.11), to start the uninstaller for that package.
Common WinGet usage
Once you start using winget more often, some other commands will become useful.
Listing and getting package details
winget listprints out all the currently installed packagesβnames, IDs, versions, etc. Note that this by default goes to the console, so you may want to redirect it to a file to read conveniently.winget show <package_ID>prints out details about a given package, as identified by its ID.
Hereβs the output from aΒ winget list command:

The full results ofΒ winget list span many more screens, but each entry lists its name, ID (used for installation and removal), version, any available upgrade, and the installation source.
Upgrades and version control
winget upradelists all the packages that have upgrades available through WinGet.winget uprade <package_ID>runs the upgrade for the package in question.winget pinlets you βpinβ a given package to its current version so that it isnβt upgraded. This way, you can ensure a given package remains at a stable version, or within a given range of versions.
Saving and loading package manifests
winget export/importdumps out or reads in the contents of the current package listing to or from a JSON format file. If you have a slew of packages you want to install reproducibly on multiple machines, this lets you generate a manifest for automating the setup process.
Adding packages to WinGetβs repository
If youβve written software that you want to distribute through WinGet, Microsoft lets you do this for free, and with tooling you probably already use. Youβll need to create a package manifest file for your project, written in YAML format, and youβll need to submit it to the Windows Package Manager repository as a GitHub pull request. But apart from the work involved on your part, there is no cost to you for adding or keeping a project in WinGetβs repos.
Third-party WinGet apps
If you are not fond of using the winget command-line interface, third-party utilities wrap winget in more convenient interfaces. One such program is WinGetUI, which wraps not only winget but numerous other package management tools for Windows.

WinGetUI wraps WinGet (and other available package managers) in a convenient graphical interface. Just about every command exposed in WinGetβs CLI is available.
Most everything possible with the winget CLI can also be done through WinGetUIβs interface. And you can always drop back to using winget at the command line if needed.


