Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microsoft/winget-cli/llms.txt

Use this file to discover all available pages before exploring further.

The uninstall command removes the specified application from your system. You can also use the remove or rm alias.

Syntax

winget uninstall [<query>...] [options]

Arguments

query
string
Search query to find the package to uninstall. Can match against package ID, name, moniker, or product code.

Package Selection Options

--id
string
Filter by package identifier
--name
string
Filter by package name
--moniker
string
Filter by package moniker
--product-code
string
Filter by product code (for MSI installers)
-m, --manifest
path
Path to manifest file containing uninstall information
-v, --version
string
Target specific version to uninstall
--all-versions
flag
Uninstall all installed versions
-s, --source
string
Source where package is registered
-e, --exact
flag
Use exact string matching for queries
--scope
string
Uninstall scope: user or machine

Uninstall Behavior

-i, --interactive
flag
Run uninstaller in interactive mode
-h, --silent
flag
Run uninstaller in silent mode
-o, --log
path
Path to write uninstaller log file
--force
flag
Force uninstall, skipping confirmation
--purge
flag
Remove all package data and settings (if supported)
--preserve
flag
Preserve package data and settings (if supported)

Authentication

--header
string
Custom HTTP header for source requests
--authentication-mode
string
Authentication mode: silent, silentPreferred, interactive
--authentication-account
string
Account to use for authentication
--accept-source-agreements
flag
Accept all source agreements

Examples

Uninstall a package by ID:
winget uninstall Microsoft.PowerToys
Uninstall with exact match:
winget uninstall --id Microsoft.PowerToys --exact
Uninstall by product code:
winget uninstall --product-code "{12345678-1234-1234-1234-123456789012}"
Uninstall a specific version:
winget uninstall Microsoft.PowerToys --version 0.70.0
Uninstall in silent mode:
winget uninstall Microsoft.PowerToys --silent
Force uninstall without confirmation:
winget uninstall Microsoft.PowerToys --force
Uninstall and remove all data:
winget uninstall Microsoft.PowerToys --purge
Uninstall multiple packages (requires matching each):
winget uninstall --query Python

Exit Codes

  • 0 - Success
  • 0x8A150001 - Package not found
  • 0x8A150011 - User cancelled
  • 0x8A15002B - Uninstaller not found
If multiple packages match your query, WinGet will ask you to select which one to uninstall or provide a more specific query.
The --purge flag permanently removes package data and cannot be undone. Use with caution.

Build docs developers (and LLMs) love