Table of Contents
- Install Windows Package Manager
- Check Windows Package Manager version (Winget)
- Search for App using winget
- Install Application using winget
- Upgrade Application using winget
- Uninstall Application using winget
- Other Winget commands
- More Information about Windows Package Manager
Windows Package Manager or
winget is a command-line tool which we can use to search, Install, upgrade, uninstall and configure applications on windows 10 systems. In this blog post, we will look at how to install Windows Package Manager and then see useful commands / switches which can be used with winget.
Install Windows Package Manager
There are different ways to install Windows Package Manager / winget Command Line Tool which are listed below:
- Winget tool is included in Windows App Installer. You can get it from Microsoft Store using this link: Windows App Installer.
Once you click on Get, It will launch local Microsoft Store app. Click on Get on this page one more time and install the App to get winget command line tools.
- Or you can download it from https://github.com/microsoft/winget-cli/releases. Please note if you download winget-cli from Github and install it on windows 10, you will have to update the app manually using the same Github page for latest version of the App and download the installer to update the app.
Check Windows Package Manager version (Winget)
Once you have installed Windows Package Manager Command line tools and you want to check the current version installed on Windows 10 system, you can use
Winget --version command or simply type Winget on the command prompt. You can either use windows command prompt or Powershell.
Search for App using winget
You can search for the applications first before you can install it on your system. winget tool queries the source and if app is found, it displays the it on the console. Let’s see how to search for the applications using winget.
We will search for a keyword called foxit and search query should result with all the apps which are matching with this name. This will have useful information like the Name, Id, Version and Source which will help us when we will install the application using winget tool. In the next section, we will see how to install Foxit PDF Reader Application on Windows 10 using winget.
winget search foxit
Install Application using winget
winget install command of winget tool is used to install the application on windows 10 machine. Please open command prompt or Powershell console as administrator.
There are various options / switches which you can use with
winget install command. Its totally optional to use command switches if not required. But the switches allows you to customize the install experience as per your requirement. Below are the most useful winget install commands along with the switches.
winget install <app name> winget install <app name> --version <version number> winget install --id <app id> --version <version number>
Let’s see what happens when we try to install Foxit PDF Reader. Previously we searched for foxit app and we have found multiple listings of Foxit PDF Reader. Therefore, we may not be able to install the application using just the application name. Lets still try it anyway to see the output.
winget install "Foxit PDF Reader"
As we expected, we received an error saying “Multiple packages found matching input criteria. Please refine the input.” Therefore, we need to be more specific when installing this app and will use application Id Foxit.FoxitReader for uniquely identifying this app for installation.
Winget install --id Foxit.FoxitReader
Winget install --id Foxit.FoxitReader command to install Foxit PDF Reader. As you can see the installation is in progress. It will be a silent installation by default, however you can include an option to make it interactive using -i or –interactive (provided the application supports interactive mode).
Installation in Progress…
Once the application is installed successfully on the machine, you will be able to see a message on command prompt or powershell console that the application has been Successfully installed.
If you want to further verify app installation, then open programs and features from control panel and look for the application you just installed.
|You can also change the scope of the application install using |
To make sure the application works fine, Launch the application from Start menu or desktop shortcut to see if its working fine.
Upgrade Application using winget
Before you upgrade any application, you need to check if the update of the app is available or not. Therefore, for this purpose we will use
winget list command which will list all the applications installed on your system including the ones which are not installed using winget. After you run
winget list, you will see all the apps and information about the apps.
Look for the application which you want to upgrade and check the Available column, if there is a version number mentioned in this column for this app then you can upgrade the application. Let’s see
winget list in action before
In below screenshot, winget list command shows all applications installed including our recently installed application Foxit PDF Reader. Available column corresponding to Foxit reader app is empty that means there are no updates available for this app at this time.
However, I have another application installed called Git on this machine and the Available column shows that version 22.214.171.124 is available. I will use this application to show you how you can upgrade this app using winget.
We again have to uniquely identify the app and use it in the command to upgrade the app. Our Application which we want to upgrade today is Git with Id Git.Git and version 126.96.36.199. Let’s see using this information if we can upgrade this app to 188.8.131.52.
winget upgrade --id Git.Git
Uninstall Application using winget
Finally we will uninstall Foxit PDF Reader Application we installed in previous step as its no longer needed. Therefore, we will use
winget uninstall command for this.
To uniquely identify the application, best it to use the Application Id because there could be multiple application having same name and then app won’t uninstall. For Uninstalling Foxit PDF Reader, we have information about the Application Id of the app which is Foxit.FoxitReader. This will be enough information for us to uninstall the app for now.
winget uninstall --id Foxit.FoxitReader
Other Winget commands
To show all the available applications to install. You can use
winget show command.
To show details about the application. Example:
winget show vscode.
More Information about Windows Package Manager
For more information and reading about Windows Package Manager. I am also providing below official documentation URL for your reference.