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 source command manages package sources that WinGet uses to find and install applications.

Subcommands

Default Sources

WinGet comes with these default sources:
  • winget - The Microsoft community repository at winget-pkgs
  • msstore - Microsoft Store packages

Source Types

Microsoft.PreIndexed.Package

The standard WinGet source type using pre-indexed package databases.

Microsoft.Rest

REST API-based sources for enterprise scenarios.

Microsoft.PreIndexed.Zip

Zip file-based package index for offline scenarios.

Examples

View all source commands:
winget source --help
Quick source update:
winget source update

Authentication

Sources can require authentication. Use --header to provide custom authentication headers:
winget source add --name PrivateSource --arg https://source.contoso.com --header "Authorization: Bearer <token>"

Trust Levels

Sources can be configured with trust levels:
  • None - No special trust
  • Trusted - Source is trusted (may affect security prompts)

Priority

Sources can have priority values to control search order. Lower numbers have higher priority.
winget source add --name MySource --arg https://example.com --priority 1

Exit Codes

  • 0 - Success
  • 0x8A150015 - Source already exists
  • 0x8A150016 - Source not found
  • 0x8A150017 - Source open failed
Modifying sources requires administrator privileges.

Build docs developers (and LLMs) love