How to reset Ubuntu Pro for WSL back to factory settings¶
Developer documentation
This page contains information of relevance to the development, testing and debugging of the Ubuntu Pro for WSL application and is not intended for general use.
You can reset Ubuntu Pro for WSL to factory settings following these steps:
Shut down WSL
wsl --shutdown
Uninstall the package and shut down WSL:
Get-AppxPackage -Name "CanonicalGroupLimited.UbuntuPro" | Remove-AppxPackage`
Remove the public directory:
Remove-Item -Recurse -Force "${env:UserProfile}\.ubuntupro\"
Remove the registry key:
Press Win+R
Type
regedit.exe
and click OKWrite
HKEY_CURRENT_USER\Software\Canonical\UbuntuPro
at the address barIf this fails, you are done (the key does not exist).
Find the
UbuntuPro
key on the leftRight-click on it
Click delete
Install the Windows Agent package again (see the section on how to install). You do not need to re-install the WSL-Pro-Service.
You’re done. Next time you start the GUI it’ll be like a fresh install.