On the latest Build, a new thing was released, but went almost unnoticed: the new package manager, WinGet (https://github.com/microsoft/winget-cli).
You may say “Another package manager ?”, and you are right: we already have Chocolatey (https://chocolatey.org/) and the Windows Store, but this one is official and uses the command line, so it’s easier to use for power users and you can create PowerShell scripts to automate installations: just create a Powershell script and run it on a new machine to have it fully configured.
To install it, you must have Windows App Installer installed in your machine. If you don’t have it, you can get it from the Windows Store:
You can download and install the Windows Package Manager from the Winget GitHub page or just install the latest version directly. Then, you will be able to use Winget to manage your packages.
You can open a Command Line, PowerShell or Terminal (BTW, this is very nice. If you haven’t installed it, you can use WinGet to install it) and use it. If you type Winget in the command line, you will have a list of commands available:
From the list, you can see the first things that come to view: install and uninstall. With Winget, you can easily install and uninstall apps in your machine. One note, here: if the operation needs admin rights, you will be asked for elevation, unless you are already running on an elevated command line prompt.
To see what’s installed in your machine, just use Winget list and it will show you all the apps installed in your machine, both Desktop apps and Store apps:
One extra thing that is shown there is, if the app is available on Winget, it will show you if the app is up-to-date or there is an updated version of the app. For example, it’s showing that there is a newer version of the excellent markdown editor, MarkdownMonster (if you edit markdown files, I really recommend checking it). I can update it with
winget upgrade "Markdown Monster"
To get a list of all apps that can be upgraded, you can type
winget upgrade
You can upgrade all available packages with
winget upgrade --all
If you want to install a package, you can search to see if it’s in Winget’s repository with
winget search
That will show you all the packages available in the repository
You can install any of them using Winget install and use the name or the id of the app. For example, you can install version 3.9 of Python using
winget install "python 3.9"
In this case, I used the quotes for the name, because the name has spaces in it.
If you want to know details of a package, you can use the Show command:
winget show Powertoys
You will have the description, publisher, website and other information of the package
All the packages are obtained from registered repositories, which you can manage with the winget source command. To list the registered repositories, you can use
winget source list
At the moment, you can’t set up your own repositories, but I think that in the future that will be possible and will open the possibility for an enterprise to create its own repository of registered apps, available for all its members.
As Winget is still in development, there may be some experimental features that may be disabled or enabled. To list the experimental features available, you can use the Winget features command:
You can enable the experimental features by configuring the settings for Winget. hen you type Winget settings, the default editor for json files is opened with the settings file, where you can edit the preferences for Winget. you can check the preferences for the current version at https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md
As you can see from my settings file, I have enabled the Rainbow progress bar, set the install preferences to User and enabled the store experimental feature.
One nice feature is that you can export the installed apps in your machine to a file that can be used in another machine to reinstall the same apps. But there is a catch: only files in Winget repository will be installed. That way, you may not have your machine fully configured, but that will be better when the repository has more programs.
Conclusions
Winget is a very promising package manager, it still doesn’t have a huge repository of packages (there are currently about 1400 apps there) but, if you have created an app, you can submit yours here. There are still some features I’d like to have, but let’s see what the future will bring us:
- Knowing more information on an installed package: Description, manufacturer, website, installation folder
- Search and Installed apps ordered by Name