source reset command resets sources to their default configuration, removing custom sources or restoring default sources.
Syntax
Options
Reset specific source by name. If omitted, resets all sources.
Execute reset without confirmation prompt
Examples
Reset all sources (shows preview):Behavior
Reset All Sources
Without--name, the command:
- Removes all custom sources
- Restores default sources (
winget,msstore) - Clears source caches
- Prompts for confirmation unless
--forceis used
Reset Specific Source
With--name, the command:
- Removes and re-adds the named source
- Clears that source’s cache
- Restores default configuration for that source
Preview Mode
Without--force, shows what will be reset:
Force Reset
With--force, executes immediately:
Use Cases
Troubleshoot Source Issues
If a source is corrupted or behaving unexpectedly:Remove All Custom Sources
Restore clean default configuration:Restore Deleted Default Source
If you accidentally removed the defaultwinget source:
Group Policy Protection
Sources configured via Group Policy are not affected by reset:Exit Codes
0- Success0x8A150016- Source not found (when using--name)0x80070005- Access denied (requires administrator)
Resetting sources requires administrator privileges.