How to reset UP4W back to factory settings¶
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.