|

How To Use Winget To Install Apps In Windows 11 (2026)

Winget is the command line app installer built into Windows 11, and it lets you install, update and remove programs by typing a short command.

It is the quickest way to set up a new PC, because one line replaces a browser download, an installer and a series of Next buttons.

Every command below comes from Microsoft Learn’s winget pages, so you can paste them into Terminal as written.

Table of Contents

Quick answer: the five winget commands you need

TaskCommand
Find an appwinget search appname
Install an appwinget install --id Publisher.App -e
See what is installedwinget list
See and apply updateswinget upgrade then winget upgrade --all
Remove an appwinget uninstall appname

Type winget --help at any time to list every command.

What winget is and what it needs

Microsoft describes WinGet as a command line tool for discovering, installing, upgrading, removing and configuring applications on Windows.

It ships as part of App Installer, a system component that the Microsoft Store delivers and updates.

Microsoft lists support for Windows 10 version 1809 (build 17763) or later, and Windows 11 is included.

Open a terminal and check winget works

  1. Right-click Start and choose Terminal.
  2. Type winget --version and press Enter.
  3. A version number means winget is ready, and an error means you should read the missing winget section below.

You can use Command Prompt, PowerShell or Windows Terminal, because the commands are identical in each.

Run winget search followed by part of the app name, for example winget search powertoys.

The results show each app’s name and its ID, and you will want the ID for the next step.

Wildcards are not supported, so type a plain word rather than something like power*.

If the app you want is missing from the community repository, Microsoft says you can submit a package to the winget-pkgs project so it becomes available to everyone.

Step 2: install the app

The simplest form is winget install appname, which Microsoft documents as a case-insensitive substring match on the name, ID and moniker.

When more than one app matches, winget lists the matches and asks you to narrow the search.

Microsoft calls the most reliable approach combining the ID with the exact-match switch, shown here for Git.

winget install --id Git.Git -e

If the same package appears in more than one source, add --source winget to pick the community repository.

Apps from the Microsoft Store use their own IDs, and Microsoft’s example is winget install XP9KHM4BK9FZ7Q -s msstore.

Accept the agreements when asked

The first time you use a source, winget asks you to accept its terms, and some packages also show a license prompt.

Microsoft says that declining a package license means the app is not installed.

To skip the prompts, add --accept-package-agreements and --accept-source-agreements to the command.

The package switch does not cover optional or bundled offers inside an installer, so watch for those if you also use --silent.

Install options worth knowing

OptionWhat it does
--versionInstalls a specific version instead of the highest one
--scopeTargets user or machine scope
--locationSets the install folder, if the installer supports it
--interactiveRuns the installer with its normal windows
--silentRuns the installer with no user interface
--no-upgradeSkips the upgrade if the app is already installed

For example, Microsoft’s page shows winget install --id Microsoft.PowerToys --version 0.91.1 for a pinned version.

Install several apps in one command

List more than one ID separated by spaces, and winget installs them one after another.

winget install Microsoft.VisualStudioCode Microsoft.PowerShell Git.Git

For a larger set, Microsoft points to the export and import commands, which save your installed packages to a file and install everything in a file on another PC.

See what is installed

The winget list command shows apps on your PC, including apps that were not installed with winget.

Add a word to filter, as in winget list git, or use --id for an exact ID.

Microsoft says the output also shows the newer version and its source when an update exists, and winget list --upgrade-available shows only those apps.

Update your apps

Run winget upgrade with nothing after it to see which apps have an update waiting.

Then update one app with its ID, or everything at once with the all switch.

winget upgrade --id Microsoft.PowerToys
winget upgrade --all

Microsoft recommends previewing with the plain command first, because that list is exactly what the all switch will change.

App situationWhat upgrade does
Version cannot be determinedSkipped unless you add --include-unknown
Pinned with wingetSkipped by –all unless you add --include-pinned
Query matches several appsYou are asked to narrow it down

Remove an app

Run winget uninstall followed by the app name or its ID.

Microsoft says this also works for apps that winget did not install, because winget list shows them too.

If the Microsoft Store agreement prompt appears, add --source winget to avoid it, or remove the app in Settings under Apps instead.

The --all-versions switch removes every installed version of the app.

Administrator prompts

Some apps need elevation, and Windows prompts you to approve it when you run a normal terminal.

Microsoft warns that if you decline, the installation fails.

It also notes that an Administrator Command Prompt shows no elevation prompts at all, so only run tools you trust there.

If winget is missing or not recognized

Winget may not be available until you first sign in as a user, because the Store registers App Installer in the background.

Microsoft’s fix is to run this in PowerShell, then try again.

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

If App Installer is gone entirely, Microsoft links its Microsoft Store page as the place to download it.

We also have a longer guide to fixing winget is not recognized.

Where winget keeps its logs

Microsoft says logs are written to the DiagOutputDir folder under the Microsoft.DesktopAppInstaller package in your LocalAppData folder, unless you redirect them.

Add --logs to a command to open the logs folder directly.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *