wingettutorialuninstallwindows

How to Uninstall Windows Apps Using winget

Remove Windows apps cleanly from the command line. winget uninstall, batch removal, and how to clean up leftover files when the installer leaves a mess.

· 5 min read · updated May 29, 2026
How to Uninstall Windows Apps Using winget

Click through Add/Remove Programs for ten minutes, or run one command? Here's how to remove apps cleanly with winget — single app, batch, system apps, and the cleanup tricks for the ones that leave files behind.

The basics

Remove a single app by ID:

winget uninstall --id Microsoft.VisualStudioCode

If the package ID isn't matching exactly, force an exact match:

winget uninstall --id Microsoft.VisualStudioCode -e

(Without -e, winget does substring matching, which can grab the wrong app when names overlap.)

Find the right ID first

winget list

prints everything installed (winget-tracked or not). It's the most reliable way to find the exact ID:

Name                          Id                            Version    Source
-----------------------------------------------------------------------------
Microsoft Visual Studio Code  Microsoft.VisualStudioCode    1.121.0    winget
Discord                       Discord.Discord               1.0.9165   winget
Some Random App               ARP\Machine\X86\{...}         3.2.1

If Source says winget, use the ID as-is. If Source is empty (system app), the ID still works — try winget uninstall --id "ARP\Machine\X86\{...}".

For a partial search:

winget list --name "visual studio"

Uninstall apps you didn't install via winget

This is the underrated trick. winget reads the same Windows uninstall registry that Add/Remove Programs uses. So apps installed manually, via MSI, via vendor installers — winget can remove them too.

Example: you installed Notepad++ from the website 6 months ago. winget never managed it. You can still:

winget uninstall --id Notepad++.Notepad++

If the ID-based lookup fails, fall back to name:

winget uninstall --name "Notepad++"

Batch uninstall

Pass multiple IDs separated by spaces (PowerShell):

"Discord.Discord", "Spotify.Spotify", "Notion.Notion" | ForEach-Object {
  winget uninstall --id $_ -e --silent
}

Or use a file:

Get-Content remove.txt | ForEach-Object {
  winget uninstall --id $_ -e --silent
}

Where remove.txt is one ID per line:

Microsoft.Edge
Microsoft.OneDrive
Microsoft.Teams

(Yes, those can be uninstalled — see next section.)

Removing stubborn Microsoft pre-installed apps

Some Microsoft apps (Mail, Maps, Xbox Game Bar, OneDrive) are pinned and resist winget uninstall. You'll get "No applicable upgrade found" or "Access denied".

For modern UWP apps, switch to PowerShell:

# Find the package family name
Get-AppxPackage *xbox* | Select Name, PackageFamilyName

# Remove for current user
Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage

# Remove for all users (needs admin)
Get-AppxPackage Microsoft.XboxGamingOverlay -AllUsers | Remove-AppxPackage -AllUsers

For OneDrive (it's a regular Win32 installer):

winget uninstall --id Microsoft.OneDrive

If that fails because OneDrive is running:

taskkill /f /im OneDrive.exe
"$env:SystemRoot\SysWOW64\OneDriveSetup.exe" /uninstall

Silent uninstall (for scripts)

Add --silent or --disable-interactivity to suppress any installer GUI dialogs:

winget uninstall --id Some.App --silent --disable-interactivity

These two flags together handle 95% of unattended uninstalls. The remaining 5% are installers that ignore both flags — for those, use the specific --override flag with installer-specific switches:

winget uninstall --id Some.App --override "/quiet /norestart"

Clean up leftover files

winget uninstall runs the publisher's uninstaller. Most uninstallers leave behind:

  • User config in %APPDATA%\<AppName>
  • Cache in %LOCALAPPDATA%\<AppName>
  • Sometimes Program Files folder if the uninstaller's incomplete

After winget reports success, clean up:

# Replace AppName with the folder name (e.g. "Discord", "Code")
Remove-Item "$env:APPDATA\AppName" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\AppName" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ProgramFiles\AppName" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "${env:ProgramFiles(x86)}\AppName" -Recurse -Force -ErrorAction SilentlyContinue
⚠️
Don't blindly delete %APPDATA% folders without checking — your saved games, browser profiles, and password manager vaults live there. Always confirm what's in the folder before nuking it.

Uninstall everything from a publisher

To clean out all apps by a single publisher (e.g. "remove every Adobe app"):

winget list --source winget |
  Where-Object { $_ -match '^Adobe\.' } |
  ForEach-Object {
    $id = ($_ -split '\s+')[1]
    winget uninstall --id $id -e --silent
  }

This pipes everything matching Adobe.* into a loop and uninstalls each.

Common errors and fixes

"No installed package found matching input criteria"

Wrong ID, or the app isn't actually installed. Run winget list --name <partial> to find the real ID.

"Uninstall failed with exit code 1603"

Generic Windows Installer failure. The MSI is broken. Try Microsoft's Program Install and Uninstall troubleshooter, then re-run winget.

"Multiple packages match input criteria"

Be more specific:

winget uninstall --id Microsoft.VisualStudioCode -e

The -e forces exact match. Or specify --source winget to only uninstall from the winget catalog.

"App keeps reinstalling itself" (Edge, Teams)

Some Microsoft apps reinstall after Windows Update. There's no clean fix — you either accept it or use third-party debloat tools (which we don't recommend on production machines).

Verify uninstall completed

winget list --id Microsoft.VisualStudioCode

If output is empty (or "No installed package matches"), the app is gone.

For full audit:

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
  Where-Object { $_.DisplayName -like "*VS Code*" } |
  Select DisplayName, UninstallString

Empty = gone from the registry.

Doing a fresh start?
After cleaning up, use winget.tech to build a curated install list for your new setup — no clicks, just a script.
Browse packages →

What's next?

Continue reading