winget Basics: Update Every App With One Command

Search, install, update everything at once and carry your whole app list to a new PC, all with a few short winget commands.

FREE$34.95UpdateStar PremiumShare a link to claimPatch day on your PC usually looks like this: the browser wants a restart, the media player shows an update banner, the PDF reader has a new version, and three other tools quietly fell behind months ago. You click "Download", "Next", "Next", "Finish" over and over. There's a faster way, and it's already on your computer.

It's called winget, short for Windows Package Manager. It's a command-line tool that finds, installs, updates and removes programs with short commands. It ships as part of Microsoft's App Installer on Windows 11 and current Windows 10 versions, and Microsoft keeps it updated through the Store. This guide covers the commands you'll actually use, from your first search to moving all your apps to a new PC.

Step 1: Check that winget is ready

  1. Right-click the Start button and open Terminal, or type PowerShell into the Start menu search.
  2. Type winget --version and press Enter.

If you see a version number, you're set. If Windows says the command isn't recognized on a freshly set-up PC, give it a moment: winget only registers after your first sign-in, and that happens in the background. If it still doesn't show up, update App Installer in the Microsoft Store.

The first time you search, winget may ask you to accept the terms of its sources. Type Y and press Enter.

Step 2: Search before you install

Every program in winget's catalog has a unique ID, usually in the form Publisher.Program. Find it with a search:

winget search vscode

winget search results for vscode listing name, Id, version and source columns

The list shows the name, the Id, the version and the source. Searches match parts of names, IDs, monikers and tags, which is why a search can return many hits. The Id column is what you need for the next step.

Step 3: Install with the exact ID

winget install --id Microsoft.VisualStudioCode -e

The --id option tells winget to look only at IDs, and -e (short for --exact) demands an exact match. Together they make sure you get exactly the program you picked and not a similarly named one. winget downloads the installer, checks its hash and runs it. Some installers show a User Account Control prompt; confirm it if you trust the program.

Installing Visual Studio Code like this takes one line instead of a browser trip, a download and an installer wizard.

Step 4: See what's out of date

Now the part that saves the most time. Type:

winget upgrade

Without any other arguments, the command lists every installed app for which winget knows a newer version. The same list is available with winget list --upgrade-available. The table shows the installed version and the available one side by side.

winget list command with the upgrade-available option showing installed and available versions

winget doesn't only know apps it installed itself. winget list shows everything installed on the PC, including programs you set up the old-fashioned way, and many of them can be updated through winget too.

Step 5: Update everything at once

winget upgrade --all

winget now works through the list and installs each update in turn. Go grab a coffee. A few practical notes:

  1. Close the programs you're updating first. Installers often can't replace files that are in use.
  2. Run the terminal as administrator if you want fewer UAC prompts for apps installed for all users.
  3. Some apps don't report a version. winget skips them by default. Add --include-unknown to update them anyway.
  4. Want to update just one app? Use winget upgrade --id Microsoft.PowerToys with the ID of that program.

Preview the list with plain winget upgrade before you run --all, so there are no surprises.

Trick 1: Pin apps that must stay put

Sometimes you don't want the latest version, for example when a plugin only works with the current one. That's what pins are for.

winget pin add --id Microsoft.PowerToys

A normal pin keeps the app out of winget upgrade --all, but you can still update it on purpose with winget upgrade --id. Add --blocking to stop winget from updating it at all, or use --version 1.2.* to allow only updates within one version range. winget pin list shows all pins, and winget pin remove --id plus the ID lifts one. Keep in mind that a pin only affects winget. The app's own updater can still update it.

Trick 2: Move all your apps to a new PC

This is the feature that makes a new computer feel like home within an hour. On the old PC:

winget export -o apps.json

winget writes a JSON file with the IDs of all installed apps it can match to its catalog. Programs it can't match show up as warnings and are left out. Open the file in a text editor and delete anything you don't want on the new machine.

Copy the file to the new PC, for example on a USB stick or through your cloud storage, and run:

winget import -i apps.json --accept-package-agreements --accept-source-agreements

winget import command installing packages listed in a JSON file one after another

winget installs the apps one after another and reports anything that's unavailable or already installed. The two --accept options skip the license prompts, so make sure you're fine with the terms of the apps on your list. Your settings and files don't travel with the list. This only installs the programs.

Trick 3: Uninstall cleanly

winget uninstall --id VideoLAN.VLC

Same idea as installing: use the ID from winget list. If winget asks you to accept Microsoft Store terms during an uninstall, add --source winget to the command.

When winget gets it wrong

Upgrades can fail when the app is still running, when an installer needs a restart, or when the publisher changed its installer. Run the failed update again on its own with winget upgrade --id and the program's ID to see the full message. If winget keeps offering an update that's already installed, the version information of the installed program and the catalog don't match. Then pin the app and update it through its own updater. Prefer clicking to typing? The free UniGetUI puts a graphical interface on top of winget.

Our verdict

winget is for anyone who's tired of hunting for update buttons, and it costs nothing. Today, open a terminal, run winget upgrade to see how many apps are behind, then let winget upgrade --all catch up. Run winget export while you're at it, and your next PC move is already prepared.

Related on UpdateStar

about author