If you spend May 2020 focused on other things than tech news, you may have missed the announcement of the Windows Package Manager. It took me a while to find this little gem and noticed that many developers had no clue either that this tool runs on their Windows 10 and 11 machines.
This package manager is not as comprehensive as the ones on Linux. Nevertheless, the number of applications you can manage is impressive and goes way beyond Microsoft products. Let us explore the command line tool winget, that allows us to manage our applications.
Search for packages
If we want to know if an application can be installed with winget, we can search for the package:
1 |
winget search TOPIC |
There is a little trick to get the full list of packages:
1 |
winget search -q "" |
If you run the command in a PowerShell terminal, you will get an error about parameters. In that case escape the ” to get the list of packages:
1 |
winget search -q `"`" |
Show details of a package
When we want to see some details of a package, we can use this command:
1 |
winget show PACKAGE.ID |
Install a package
If we found a package, we can install it with this command:
1 |
winget install PACKAGE |
List the installed packages
To get a list of all packages we installed with winget, we can use this command:
1 |
winget list |
Are there any updates?
With this command we can check for updates to our installed applications:
1 |
winget upgrade |
This gives us a list of applications with available updates:
Update a specific application
We can update a specific application with this command:
1 |
winget upgrade PACKAGE |
Update all applications
When we want to update all applications at once, we can use this command:
1 |
winget upgrade --all |
Conclusion
With the Windows Package Manager we finally get a package manager directly from Microsoft. This allows us to install and update packages on the command line without first installing the package manager itself.
While more developer-focused tools like Chocolatey still have their place, the Windows Package Manager is a valuable tool for power users.