How to Install Windows Package Manager (winget) and Search, Install, Upgrade, Uninstall Apps on Windows 10 using winget

Overview

winget

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.
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.

Windows App Installer
  • 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.

winget --version

winget --version

winget

winget

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

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"

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

Running 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).

Winget install --id Foxit.FoxitReader

Installation in Progress…

Foxit PDF Reader

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.

Winget install --id Foxit.FoxitReader

If you want to further verify app installation, then open programs and features from control panel and look for the application you just installed.

Foxit PDF Reader
Tip
You can also change the scope of the application install using --scope option / switch to change the application installation scope to either user scope or machine scope.

To make sure the application works fine, Launch the application from Start menu or desktop shortcut to see if its working fine.

Foxit PDF Reader

Upgrade Application using winget

Winget List

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 winget upgrade.

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 2.33.0.2 is available. I will use this application to show you how you can upgrade this app using winget.

winget list

Winget upgrade

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 2.23.0.2. Let’s see using this information if we can upgrade this app to 2.33.0.2.

winget upgrade --id Git.Git

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

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.

https://docs.microsoft.com/en-us/windows/package-manager/

Subscribe to Stay Connected

Thank you for visiting TechPress 👍. When you subscribe to the blog, email notification ✉ will be sent to you when a new blog post is published. You can unsubscribe at any time.

guest
0 Comments
Inline Feedbacks
View all comments