Danny Moran

How to use Winget (Windows Package Manager)

Published March 18, 2023 by Danny Moran

Table of Contents
PAGE CONTENT

Introduction

Learn how to use Winget, the built-in Windows Package Manager. In this example, I show you how to use winget to install applications, update applications, remove applications, export a list of currently installed applications, and import a list of applications for automatic installation.

How to use Winget video

Finding software using Winget

To find software that can be installed using Winget, you can run the below command modifying the terms inside of the quotes to whatever you are looking for. In the example, I am searching for Google Chrome.

winget search "google chrome"

Getting more information about Winget packages

When you have found the package for the application you want to install, you can then query more information from the package manifest. This let you check to make sure that it’s the correct application and provides information such as the publisher, version number, description, file download url, file download hash, as well as other pieces of information. In the below example, I am querying the Google Chrome package.

winget show "google chrome"

Installing software using Winget

Once you’ve found the software package you want to install, you can easily install it using the install command. This command will automatically download the latest version of the application and then install it. In the example, I am installing Google Chrome.

winget install "google chrome"

Upgrading installed software using Winget

A great feature of Winget is that you can upgrade already installed software to the latest verion from the command line. To find out what software packages have updates available, you can run the following command to generate a list which includes all software, their existing version, as well as the latest verion that is available to be upgraded to.

winget upgrade

Upgrading all software at once

Once you have found what application are available to be upgraded, there are two ways to upgrade them. You can either upgrade everything, or you can pick specific items to upgrade.

To upgrade all software that have upgrades available, you can run the following command:

winget upgrade --all

Upgrading individual software

To upgrade specific software packages, you can run the following command, replacing the name within the quotes with the name of the software you want to upgrade. In this example, I am upgrading Google Chrome.

winget upgrade "google chrome"

Uninstalling software using Winget

To uninstall software using Winget, you can run the following command, replacing the name within the quotes with the name of the software you want to uninstall. In this example, I am uninstalling Google Chrome.

winget uninstall "google chrome"

Importing and exporting Winget software lists

Winget has the capability of exporting all installed software to a json file. This file can then be used to import into a different computer and it will then install all the required software.

Exporting a software list

To export a json list of all software that is installed on the computer, you can run the following command:

winget export -o c:\winget\winget.json

Importing a software list

Once you have a json software list, you can then import it. Once you run the import command, Winget will automatically go through the list and make sure that all software that is on the list is installed on the computer you are importing it to. If any software that is on the list isn’t installed, Winget will automatically go and download the file and then install it. You can import a Winget json file using the below command:

winget import -i c:\winget\winget.json