Skip to content

Commit ff8ff61

Browse files
committed
Do not install a distro on re-install of WSL
1 parent 8cfc405 commit ff8ff61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wsl-reset.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ switch ($arg) {
3131
if (-not (Get-AppxPackage *WindowsSubsystemForLinux* | Remove-AppxPackage -ErrorAction SilentlyContinue 2>$null)) {
3232
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -ErrorAction SilentlyContinue 2>$null
3333
}
34-
wsl.exe --install --no-launch
34+
wsl.exe --install --no-launch --no-distribution
3535
Write-Host "WSL has been shutdown and re-installed."
3636
}
3737
"--destructive-reset" {
@@ -51,7 +51,7 @@ switch ($arg) {
5151
if (-not (Get-AppxPackage *WindowsSubsystemForLinux* | Remove-AppxPackage -ErrorAction SilentlyContinue 2>$null)) {
5252
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -ErrorAction SilentlyContinue 2>$null
5353
}
54-
wsl.exe --install --no-launch
54+
wsl.exe --install --no-launch --no-distribution
5555
Write-Host "WSL has been shutdown, all distros unregistered, and WSL has been re-installed."
5656
}
5757
default {

0 commit comments

Comments
 (0)