Skip to main content
The source reset command resets sources to their default configuration, removing custom sources or restoring default sources.

Syntax

winget source reset [options]

Options

-n, --name
string
Reset specific source by name. If omitted, resets all sources.
--force
flag
Execute reset without confirmation prompt

Examples

Reset all sources (shows preview):
winget source reset
Reset all sources (execute):
winget source reset --force
Reset specific source:
winget source reset --name winget --force

Behavior

Reset All Sources

Without --name, the command:
  1. Removes all custom sources
  2. Restores default sources (winget, msstore)
  3. Clears source caches
  4. Prompts for confirmation unless --force is used

Reset Specific Source

With --name, the command:
  1. Removes and re-adds the named source
  2. Clears that source’s cache
  3. Restores default configuration for that source

Preview Mode

Without --force, shows what will be reset:
winget source reset
Output:
Resetting all sources will remove all custom sources and restore default sources.

Current sources:
  winget
  msstore
  Contoso
  PrivateRepo

Sources after reset:
  winget
  msstore

Use --force to confirm this operation.

Force Reset

With --force, executes immediately:
winget source reset --force
Output:
Resetting all sources...
Done

Use Cases

Troubleshoot Source Issues

If a source is corrupted or behaving unexpectedly:
winget source reset --name winget --force
winget source update

Remove All Custom Sources

Restore clean default configuration:
winget source reset --force

Restore Deleted Default Source

If you accidentally removed the default winget source:
winget source reset --force

Group Policy Protection

Sources configured via Group Policy are not affected by reset:
Note: Sources managed by Group Policy will be preserved.

Exit Codes

  • 0 - Success
  • 0x8A150016 - Source not found (when using --name)
  • 0x80070005 - Access denied (requires administrator)
Resetting sources requires administrator privileges.
Resetting all sources removes custom sources permanently. Re-add them manually after reset if needed.

Build docs developers (and LLMs) love