Microsoft has finally revealed a long requested feature; a Windows package manager called Winget that allows you to easily install applications from the command line.
Commonly used in Linux to install new applications, package managers are tools that automate the installation, upgrading, and deletion of applications.
It does this by looking through configured repositories, or sources as Microsoft likes to call them, for applications. If the application is available, it will download it from the repository and install it onto the computer.
What makes package managers so desirable is that they also manage dependencies before installing the requested program.
This means that if you try to install a program, and it needs another program to work, the package manager will automatically install that required program as well.
Third-party Windows package managers like Chocolatey and Ninite already exist, but what makes winget so special is that it is being developed by Microsoft and will eventually be built into Windows.
How to install winget
As the Winget Windows Package Manager is currently in preview, Microsoft has provided two ways to install it in Windows 10.
Method 1: Install through Windows 10 Insider builds
If you are a Windows Insider, you can signup for the the Windows Package Manager Insiders Program with the same Microsoft account email address you use on your Insider build.
Once approved, the Microsoft Store will upgrade the App Installer package on your Windows 10 Insider build and you will now have access to the winget command in PowerShell.
Method 2: Download latest appxbundle from Winget’s GitHub page
The easier method, and one that can be used by all Windows 10 users, is to download the latest version from Winget’s GitHub releases page.
Once downloaded, double-click on the Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle file and the App Installer program will run.
When the following screen shows, click on the Update button.
When done, the App Installer screen will state “For proper functioning of the app, try to launch a Windows app package.” At this point, close the App Installer window.
You will now have access to the winget command in PowerShell.
Using the Windows 10 winget package manager
With this initial release of the winget package manager, Microsoft’s goal was to get a preview into people’s hands so that they could start playing with it.
Due to this, the current commands are for the most part designed to install, show, and search for applications using the package manager.
To see a full list of commands for the Windows package manager, simply type
winget at a PowerShell prompt and a help screen will be displayed.
To see help for each command, you can just type the specific command and follow it with a -?.
For example, to see the help screen for the install command, you would enter the command:
winget install -?
Searching for packages
To search for a package to install, you can use the
winget search command. When searching for a particular keyword, winget will return results for all packages whose name contains that string.
For example, to search for all package that contain the word note, we would use the command:
winget search note
As you can see, both Notepad++ and Evernote were listed as they both contain the string ‘note’.
If you want to see a list of all available packages, you also type
winget search without any arguments, and the full list will be displayed.
It is more useful when you use the
winget search | more command to see a list of packages one page at a time.
Getting package information
To see more information about a particular package you would use the
winget show command.
For example, to see details about Notepad++ including the version, its license, the program’s description, the developer, and where it will be installed from, we use the following command:
winget show notepad++
Installing a package
When you have decided what package you wish to install, you use the
winget install command.
For example, to install Notepad++ we would use the following to command to download and install it it from developer’s web site or GitHub repository:
winget install Notepad++
It should be noted that the winget package manager does not currently keep track of your installed packages.
So you can install a program through winget even if it is already installed.
Winget does not currently have the ability to uninstall a package, but it is planned for the version 1.0 release in May 2021.
For now, if you install an application using winget, you will need to use the normal Apps & features settings screen to uninstall the program.
Listing package repositories
As we previously explained, package managers allow you to add repositories, or sources, that will be used to search for applications to install.
While Microsoft plans on allowing you to add multiple repositories in the future, at this point winget only allows you to configure one at a time.
To manage your repositories/sources, you can use the
winget source command.
For example, to see the current repository configured in winget, you can type the following command:
wget source list
As you can see, the default repository for winget is the Microsoft managed one at https://winget.azureedge.net/cache.
As of right now, the default Microsoft repository contains 278 applications, including popular ones such as the VLC media player, Notepad++, Epic Games Launcher, Wireshark, and Plex.
The full list of available applications can be found in the repository’s GitHub page.
Future plans for winget, the Windows package manager
Microsoft plans on releasing Winget 1.0 in May 2021 and has a list of features that it will like to add.
Some of the features planned for Winget 1.0 include:
- Dependency management
- Uninstall apps
- Install apps from the Microsoft Store
- Update one or all installed apps
- List installed apps
- Group Policy control
- Support for silent installs, though this may be used by threat actors when install malware from their own repositories.
This is an exciting roadmap, and for those of you who commonly work from the command line, winget will ultimately prove to be a popular tool.
This is even more true when you can add your own repositories to install apps from.