PowerShell: update all apps with one command (winget upgrade --all)

Martin Brinkmann
Updated •
Windows 10

The PowerShell command to update all apps on Windows is winget upgrade --all. It uses the Windows Package Manager (winget), which ships with Windows 11 and modern Windows 10 as part of App Installer. Run winget upgrade first to see which programs have updates, then winget upgrade --all to install every available update in one go. It works for many desktop programs, not only those installed with winget.

This guide covers the exact commands, the switches that make bulk updates silent and complete, how to keep specific apps on their current version, the native PowerShell cmdlet alternative, and how to update the Windows Package Manager itself.

How to update all apps with PowerShell and winget

Updating all apps with PowerShell takes two winget commands: one to preview, one to upgrade. Winget runs in PowerShell, Windows Terminal and Command Prompt alike.

  1. Right-click Start (or press Windows-X) and open Terminal (Admin) or Windows PowerShell (Admin).
  2. Type winget upgrade and press Enter. Winget lists every installed program it can match to its repository, with its name, ID, installed version and available version.
  3. Type winget upgrade --all and press Enter to download and install all listed updates.
  4. Accept the source agreement with Y if winget asks for it on first use.
  5. Run winget upgrade again when it finishes to confirm that nothing is left.

Running the shell as administrator matters. In a normal window, some installers ask for UAC elevation and the upgrade fails if you decline. In an elevated window, Microsoft notes, those prompts do not appear, so only use it with sources and apps you trust. The command winget update --all is an alias and does exactly the same thing.

Winget upgrade switches for a complete, silent update

Winget upgrade accepts switches that control which apps are included and how installers behave. The defaults skip some apps, so these flags decide whether "all" really means all.

Switch What it does
--all (or -r, --recurse) Upgrades every installed package that has a newer version available.
-h, --silent Runs installers silently and suppresses their UI (some installers ignore it).
-u, --include-unknown Also upgrades packages whose installed version winget cannot determine.
--include-pinned Also upgrades packages with a non-blocking pin.
--accept-package-agreements Accepts package license agreements without a prompt.
--accept-source-agreements Accepts the source agreement without a prompt.
--uninstall-previous Removes the previous version during the upgrade (depends on the package).

A one-line command for an unattended update of everything looks like this:

winget upgrade --all --silent --include-unknown --accept-package-agreements --accept-source-agreements

Leave out --include-unknown if you only want upgrades winget can verify by version number. Apps that do not report a version are otherwise treated as "latest" and skipped, which is why a program you know is outdated may not appear in the list.

Update one app or exclude apps from winget upgrade --all

Winget can update a single program by its ID and can pin programs so that bulk upgrades leave them alone. Use the ID from the winget upgrade list and add -e for an exact match.

winget upgrade --all installing updates for all outdated Windows programs in PowerShell

  • winget upgrade --id Microsoft.PowerToys -e updates one program only.
  • winget pin add --id Microsoft.PowerToys keeps it out of --all, while a direct upgrade of that ID still works.
  • winget pin add --id Microsoft.PowerToys --blocking blocks every winget upgrade of it until the pin is removed.
  • winget pin add --id Microsoft.PowerToys --version 0.70.* allows updates only within that version range.
  • winget pin list shows all pins; winget pin remove --id Microsoft.PowerToys deletes one.

Pins are useful for programs where a new major version breaks plugins, licenses or workflows. A pin only affects winget: the program's own updater can still update it.

Update all apps with the WinGet PowerShell module

The Microsoft.WinGet.Client module adds native PowerShell cmdlets for winget, which return objects instead of text and are better suited to scripts. It is published by Microsoft on the PowerShell Gallery and requires PowerShell 5.1 or later.

  1. Install the module: Install-Module -Name Microsoft.WinGet.Client
  2. List apps with updates: Get-WinGetPackage | Where-Object IsUpdateAvailable
  3. Update all of them: Get-WinGetPackage | Where-Object IsUpdateAvailable | Update-WinGetPackage

Add -Mode Silent to Update-WinGetPackage to suppress installer windows, and -IncludeUnknown for packages without a recorded version. Microsoft documents the pipeline example in the Update-WinGetPackage reference. For quick manual updates, the plain winget upgrade --all command remains the shorter option.

How to update the Windows Package Manager itself

The Windows Package Manager updates through the Microsoft Store, because winget is part of the App Installer system component. You do not update it with a winget command.

  1. Open the App Installer page in the Microsoft Store.
  2. Select Update (or Get, if App Installer is missing).
  3. Run winget --version in PowerShell to confirm the new version.

Alternatively, open the Microsoft Store, open the Store's Library (Downloads in newer Store versions) and select Get updates to update App Installer together with other Store apps. On Windows Server 2025, App Installer updates through Windows Update. If winget is missing right after a first sign-in, Microsoft says the Store may not have registered it yet; Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe requests the registration. In environments without the Store, such as Windows Sandbox, Repair-WinGetPackageManager -AllUsers from the WinGet PowerShell module installs it. Winget requires Windows 10 version 1809 (build 17763) or later.

What winget upgrade --all does not update

Winget upgrade --all only updates programs that match an entry in its sources, so a few things stay outside its reach. The command winget list --upgrade-available shows the same set of updatable packages in list form.

Winget downloads each update from the installer URL in the package manifest, which usually points to the developer's official download. Background on the tool itself is in our Windows Package Manager 1.0 review.

FAQ

Can I schedule winget upgrade --all to run automatically?

Yes. Create a Task Scheduler task that runs PowerShell with the full silent command and the two accept switches, and set it to run with highest privileges so installers do not wait for UAC prompts.

Does winget upgrade --all update Microsoft Store apps?

It can update some Store apps that winget matches to a source, but not all of them. For Store apps in general, Library (or Downloads) and Get updates in the Microsoft Store is the most reliable route.

Why does winget upgrade show an app that will not update?

The installed version may be detected differently from the repository version, or the installer may need the app to be closed. Close the program, try winget upgrade --id with the app's ID, or update it with its own updater.

Related: stop Windows from downloading updates automatically, what Microsoft Update Health Tools is

Comments

  1. Michael Ross said on
    Reply

    upgrade -all bombs out with error number on malwarebytes, doesn’t have a lot of programs yet.

  2. owl said on
    Reply

    SUMo is popular, but unreliable. A few years ago, there was an incident where SUMo’s download server was infected with malware. Furthermore, I may see beta or release pending versions, even though I specified “stable”.
    SUMo could not manage updates properly, so I switched to PatchMyPC.
    What I lack in PatchMyPC, I get RSS on the app development side, and to information from SUMo.

    Considering zero-die attacks, etc., it is important to streamline the application of updates, so I will try the Windows Package Manager.

  3. Gerodinger said on
    Reply

    I use Software Update Monitor, SUMo for this purpose.

  4. Santiage said on
    Reply

    Im worry about github developments scripts because i listen that some projects are infected with malware and another harmfull files. My choice is search and install manually soft updates.

  5. Powershell Is The King Of Shells said on
    Reply

    and dont forget that you can always type more with beloved powershell
    https://en.wikipedia.org/wiki/PowerShell#Comparison_of_cmdlets_with_similar_commands

  6. Cassette said on
    Reply

    I’ve been using Chocolatey for years and I even set up a weekly task to run an upgrade all command so I never have to mess with it. Windows Package Manager has an advantage over Chocolatey in that it knows what it already installed on the system and when it’s updated outside of when Package Manager does it. Chocolatey has those features, but not in the free version. WPM is still missing a few programs that I use that Chocolatey covers and I haven’t seen that it has a “pin” feature like Chocolatey where you can prevent it from updating selected programs.

  7. ULBoom said on
    Reply

    I guess. It would be nice to know where the updates come from and what has changed. There have been third party utilities to look for outdated programs forever. Nothing magical about CLI vs. GUI.

    It can be fairly difficult to add repositories to distros, the Linux community tends to keep packages well corralled. A home made Windows “repository” would be what, IDK, a list of links that have to be updated constantly? Not at all what distro repos comprise.

    I wonder what happens if winget finds programs on your computer it doesn’t like?

  8. Alex said on
    Reply

    I’ve been using Chocolatey for quite a while.

    choco install vlc firefox potplayer -y

    cup all -y

    choco uninstall googlechrome -y

  9. Anonymous said on
    Reply

    Download an install in bulk, by-passing my habitual VirusTotal scan. No thanks.

  10. Gavin B. said on
    Reply

    Who keep the repository clean of malware?
    If we are not directly downloading from the original website?

    1. Kali said on
      Reply

      It’s nor really visible in the screenshots because of the blue background but winget seems to download the apps from the original websites

  11. VioletMoon said on
    Reply

    Hmmm . . . I perceive a problem that prevents a Linux like experience. Several programs I run are one year or even lifetime “gratis” license programs with the serial associated directly with the installed program and version. For example, “Glary Utilities Pro.” The program updates occasionally; however, the updates are so minor that even an older Pro version of the program is better than a new “free” version, so I wouldn’t want it updated.

    Using a tool like “Patch My PC,” allows the user to uncheck any undesired updates and update all of the rest which could be over a dozen. Winget Upgrade [name of each program] would be a burden if I still want to use a licensed, Pro version of some program that would be included in the winget upgrade –all command. Maybe there is an exclusion command I missed.

    The other drawback I see with Windows Package Manager is it’s uselessness in setting up a fresh install. Say I have a dozen programs I want to install on a fresh Windows 10 machine; I can’t make that happen with Windows Package Manager. I would have to use something like Chocolately or Ninite, etc. to download/install a program before updating with the Windows Package Manager.

    With Linux, the situation is much different because programs are open source and serials/licenses aren’t an issue. As well, most distros have a prominent Software Repository that enables easy click, click, click checking for programs to install [if not already installed–I find Linux distros highly desirable because nearly anything I need is already packaged]. For me, it makes setting up a Linux machine incomparably faster and more secure than any Windows machine.

    The only way to replicate a Linux experience would be for Microsoft to offer a “software repository” for popular, desirable programs that the Windows Community agrees are useful to offer without adding bundleware, etc. to the programs.

    1. Plants said on
      Reply

      VioletMoon,

      Unless I’m missing something you can definitely do an automated install of all the programs on a fresh Windows install with winget. That’s like half the point. Winget is Chocolatey done properly.

    2. Honorius said on
      Reply

      > Say I have a dozen programs I want to install on a fresh Windows 10 machine; I can’t make that happen with Windows Package Manager.
      Just because you can’t do something doesn’t mean Windows Package Manager can’t do it.

      1. VioletMoon said on
        Reply

        Okay–name any dozen programs you would like on a fresh Windows 10 install and use Windows Package Manager to download and install only those dozen programs without resorting to a line-by-line command.

        Show us your technique and mastery.

        Not this–which is the point I am making:

        winget install –id=Microsoft.Teams -e ; winget install –id=Zoom.Zoom -e ; winget install –id=Notion.Notion -e ; winget install –id=SlackTechnologies.Slack -e ; winget install –id=Toggl.TogglDesktop -e ; winget install –id=ShareX.ShareX -e ; winget install –id=Loom.Loom -e ; winget install –id=LogMeIn.LastPass -e ; winget install –id=Spotify.Spotify -e ; winget install –id=Discord.Discord -e ; winget install –id=TeamViewer.TeamViewer -e ; winget install –id=Microsoft.Skype -e ; winget install –id=Microsoft.Edge -e ; winget install –id=Mozilla.Firefox -e ; winget install –id=Google.Chrome -e ; winget install –id=Microsoft.OneDrive -e ; winget install –id=Google.DriveFileStream -e

      2. Honorius said on
        Reply

        > without resorting to a line-by-line command.
        That was not in the original statement.
        Do you think we can’t see what you’re doing? You first blurted out something that does not correspond to reality (because you do not understand the tool, but you have a desire to blurt out in excess). And when the mistake was pointed out to you, you started making clarifications that changed the original terms.
        But even now you, again gibbering without understanding the question, so I show my “technique and mastery”:
        winget can import (and export) a list of applications. With one short command if you have that list (made beforehand with export or manually).
        And you once again showed that you’re blurting your tongue without even looking at the documentation.

        P.S.
        I miss the days when only experienced people could be Linux users, able to at least read the documentation for a program before smartly scribbling their “opinions” about it.

      3. Corky said on
        Reply

        Use a splat table and a foreach command.

      4. Cassette said on
        Reply

        I would just create a batch file with all of the programs I want. The winstall GUI will do it for you. Then you just run that file and it installs everything in one go.

  12. Dumbledalf said on
    Reply

    I tried it, it’s almost like how it was on Linux – sudo apt get update.

  13. Honorius said on
    Reply

    > Now You: how do you keep your programs up to date?
    https://ketarin.org/ – can check, download, execute actions after download (for example extract or run setup).

  14. ard said on
    Reply

    That took a long time for Microsoft to copy a feature that is already for ages available for Ubuntu and other Linux distro systems.
    In the End maybe MS starts to learn that convenience for computer users is an important issue.
    I only hope that MS has made the security make tight such that hackers cannot change the links to the upgrade sources, else you introduce a very dangerous route for malware/ransomware upload.
    Will do some tests first on my VB installation because risking it on my main machine.

    1. Steve said on
      Reply

      Well, if you read about what happened with npm, or for that matter browser extensions with similar names, or the same with Google Play Store apps, etc., then the lesson here is clear: do not trust automatic installations, upgrades, whatever and ALWAYS verify everything. For example: you download Google Chrome. Scan the .exe installer at VirusTotal. Check the digital signature of the .exe. Run it on a VM or at app.any.run and see how it goes. Then, and only then, if everything is OK install it on your machine.

      1. Konstantinos said on
        Reply

        Dude you’re paranoid.

      2. Plants said on
        Reply

        Konstantinos,

        Steve is (he’s also illogical, since he doesn’t trust the package manager, but then immediately trusts virustotal). ard OTOH makes a very sensible point.

      3. Ron989 said on
        Reply

        ‘…Then, and only then, if everything is OK install it on your machine’.

        Whatever happened to ‘living dangerously’?!!
        ;-)

Leave a Reply

By commenting, you accept our privacy policy and keep the discussion respectful and on topic.