Disable Third-Party Winget Sources via Regedit
This guide explains how to disable third-party package source repositories in the Windows Package Manager (winget) using the Windows Registry Editor (Regedit). By configuring App Installer policy keys in the registry, system administrators can prevent users from adding, modifying, or installing packages from external and untrusted package sources, locking winget down to default or organization-approved channels.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog. - Type
regeditand pressCtrl + Shift + Enter(or click OK) to launch the Registry Editor with administrative privileges. - If prompted by User Account Control (UAC), click Yes.
Step 2: Navigate to the App Installer Policy Key
In the Registry Editor address bar, paste the following path and
press Enter:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
Check if a subkey named AppInstaller exists under
Windows. If it does not exist:
- Right-click the
Windowsfolder. - Select New > Key.
- Name the new key
AppInstaller.
Step 3: Disable Additional Package Sources
- Click on the
AppInstallerkey in the left navigation pane. - Right-click anywhere in the empty area in the right-hand pane.
- Select New > DWORD (32-bit) Value.
- Name the new value
EnableAdditionalSources. - Double-click
EnableAdditionalSourcesand set its Value data to0. - Click OK to save the changes.
Setting EnableAdditionalSources to 0
explicitly prevents the addition and usage of custom or third-party
repositories via the winget source add command.
Step 4: Verify the Configuration
To verify that the policy is working:
Open PowerShell or Windows Command Prompt.
Try adding a custom source by running:
winget source add -n test https://example.com/sourceWinget will display an error message stating that the operation is blocked by Group Policy or system administration settings.