source command manages package sources that WinGet uses to find and install applications.
Subcommands
- winget source add - Adds a new source
- winget source list - Lists configured sources
- winget source update - Updates source data
- winget source remove - Removes a source
- winget source reset - Resets sources to defaults
winget source export- Exports source configuration
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:Authentication
Sources can require authentication. Use--header to provide custom authentication headers:
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.Exit Codes
0- Success0x8A150015- Source already exists0x8A150016- Source not found0x8A150017- Source open failed
Modifying sources requires administrator privileges.