source remove command removes a configured package source from WinGet. You can also use the rm alias.
Syntax
Required Options
Name of the source to remove
Examples
Remove a custom source:Behavior
The remove command:- Removes the source from WinGet’s configuration
- Deletes cached source data
- Cannot be undone (except by re-adding the source)
Default Sources
Default sources (winget, msstore) can be removed but this is not recommended. If removed, they can be restored using source reset.
Group Policy Protection
Sources configured via Group Policy cannot be removed:Exit Codes
0- Success0x8A150016- Source not found0x8A15003D- Source protected by Group Policy0x80070005- Access denied (requires administrator)
Removing sources requires administrator privileges.