WinGet is a command line tool developed by Microsoft to discover, install, upgrade, uninstall and configure applications on Windows 10/11 OS. It installed by default on your Windows client devices (Windows 10 1709 or later) as a part of App Installer. App Installer is a software component installed on a Windows device, it’s used to install MSIX and APPX packages.
Contents
Checking If WinGet is Installed on Windows
If you are already on the latest windows operating system version, Winget would be installed by default. To check and confirm if Winget is installed on your device:
- Open command prompt or PowerShell console.
- Type
winget
and press Enter. - If you get the output like this, which may also include winget version information, then it’s installed on your device. If you get any error message, then it means winget is not installed.
Installing WinGet on Windows devices
If you find that winget is not installed on your device, then you can open PowerShell console as an administrator and execute below command to install it.
Install WinGet using Powershell
PowerShell command to Install Winget
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Install WinGet using Microsoft Store
WinGet tool is included in the App Installer package, click on this MS Store link to install: Windows App Installer.
Install Using Github
You can refer to the GitHub link winget-cli/releases for more information on downloading and installing winget.
Check WinGet Version
After you have installed WinGet on your Windows device, you can open command prompt or PowerShell console and type winget --version
command to check the version information.
Check WinGet Version
winget --version
List WinGet Source Repositories
When you execute WinGet commands to search or install any application, it connects to the source repositories to check for the package availability. To find out the list of default repositories configured as a source for WinGet, execute winget source list
command.
winget source list
As shown in below screenshot, After executing above command, it lists two repositories which are configured as a WinGet source, Microsoft store catalog and Windows Package Manager app repository.
Search for an Application Using WinGet
You can search for an application in the configured source repositories to find its availability before installing it on your device. If an app with the specified name is found in the repository, its information will be displayed on the console.
Let’s take an example application, foxit and search for it in WinGet repository using winget search foxit
command. After you run this command, it will search for the app in both the configured source repositories and display it on the console.
Please note the Source column, which shows if the app is available in Microsoft Store or WinGet repository. When installing the app, you can specify which repository you want to install the app from.
WinGet Search
winget search foxit
Install an Application Using WinGet
You can install applications on your Windows device using winget install
command. To install an application, you can provide an app name or app name and version number to install a specific version of the app.
You can also provide an app ID or app ID and version number to install a specific version of the app. For a full list of all switches that can be used with winget install, refer to the link: Options.
winget install
winget install <app name>
winget install <app name> --version <version number>
winget install --id <app id> --version <version number>
Let’s take an example app called Foxit and Install it using WinGet. We previously searched for the app in the WinGet repository and found multiple entries with different versions of the app.
If you use app name to install the app, it might throw an error message Multiple packages found matching input criteria, Please refine the input. Therefore, we need to provide a unique Identifier for installing the app, like app ID.
winget install "Foxit PDF Reader"
Installing the application by using App ID
Winget install --id Foxit.FoxitReader
The installation will be silent by default; however, you can use a switch -i or --interactive
if you want to install the application in interactive mode. You can also use --scope
switch to change the installation scope to user or device.
You can verify the application installation using Programs and Features as well to confirm if it has been installed successfully.
Upgrade an Application Using Winget
To upgrade an application installed on a Windows device, you can use winget upgrade
command. Before you can upgrade an application, identify the application for upgrade using winget list
command.
WinGet List
Winget list command displays all the installed applications on your computer, whether they were installed using Winget or by other methods. It will also check and display if an app update is available along with latest app version number. Open command prompt or PowerShell console as an administrator and execute below command.
Lists all installed apps on your computer
winget list
Let’s take an example of Microsoft Edge WebView2 Runtime application. In Available column, it shows the latest version of the app is 130.0.2489.52.
WinGet Upgrade
We will use app ID with Winget upgrade command to upgrade Microsoft Edge WebView2 Runtime app.
winget upgrade
winget upgrade --id Microsoft.EdgeWebView2Runtime
Uninstall an Application Using Winget
To uninstall an application, we will use winget uninstall
command with App ID. You can run winget list command first to identify the application you want to uninstall from your computer.
winget uninstall --id Foxit.FoxitReader
Other Winget commands
winget show command of the winget tool displays details for the specified application. To show details about an application, you can use the following example: winget show vscode
.
Command | Description |
---|---|
winget show | Provides details for the specified application, e.g., winget show vscode . |
winget --help | Provides help information about a specific command. e.g., winget install --help |
winget --info | Shows information about: — System architecture — Winget directories (Log, User Settings etc.), — Links to Privacy and license agreement. — Admin Group policy settings. |
winget pin | Prevents a package from upgrading via WinGet to either to a specified range of versions, or prevents from upgrading it to any other version than the installed version. — Package can still upgrade by other means, but WinGet will not upgrade the package if pinned. Pin Types: — Pinning: Package won’t be upgraded using winget upgrade –all but can be upgraded using winget upgrade <package> command. — Blocking: Package won’t be upgraded using winget upgrade –all and also using winget upgrade <package> command. — Gating: A Package can be pinned to a specific range of versions for upgrading via WinGet. |
winget settings | Customize Winget client experience using JSON file. |
winget features | Displays Experimental features available with the Installed version of Winget. |
winget import | Use it to import a JSON file with list of apps to install in bulk or batches. |
winget export | Exports a JSON file with list of apps specified. winget export export.json |
More Information
For additional information and further reading about Windows Package Manager, you can refer to the official Microsoft documentation: Windows Package Manager.