User Tools

Site Tools


other:win10wsl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
other:win10wsl [2022/09/07 13:16]
jypeter [Restoring or relocating a Linux installation] Improved and cleaned
other:win10wsl [2022/09/07 14:55]
jypeter [Uninstalling WSL] Added main installation removal
Line 1128: Line 1128:
 Questions FIXME Questions FIXME
   * Is it possible to restore to the default location (on ''​C:​\''​) ?   * Is it possible to restore to the default location (on ''​C:​\''​) ?
-==== Uninstalling WSL ====+==== Uninstalling WSL or a distribution ​====
  
-Before ​starting, you may want to make a backup ​of whatever you had in your Ubuntu home directoryand all the files and settings that are not in the ''/​mnt''​ directories+Before ​uninstalling //​something//​, you probably ​want to [[other:​win10wsl#​creating_a_backup|create ​a backup]]just to be safe...
  
 === Removing a specific Linux installation === === Removing a specific Linux installation ===
Line 1157: Line 1157:
 * Ubuntu ​          ​Stopped ​        ​2</​code>​ * Ubuntu ​          ​Stopped ​        ​2</​code>​
  
 +
 +=== Removing the main Linux installation ===
 +
 +If you remove the main installation (on ''​C:​\''​):​
 +  * Another //​relocated//​ installation will become the new default installation (if present)
 +    * <​code>​PS C:​\Users\your_login>​ wsl -l -v
 +  NAME             ​STATE ​          ​VERSION
 +  Ubuntu_custom ​   Running ​        2
 +* Ubuntu ​          ​Running ​        2
 +
 +PS C:​\Users\your_login>​ wsl --unregister Ubuntu
 +Désinscription...
 +
 +PS C:​\Users\your_login>​ wsl -l -v
 +  NAME             ​STATE ​          ​VERSION
 +* Ubuntu_custom ​   Running ​        ​2</​code>​
 +
 +  * The initial installation directory will still be present on ''​C:​\'',​ and should probably be left untouched:
 +    * ''​C:​\Users\your_login\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\''​
 +    * ...with a very low disk usage (the big ''​ext4.vhdx''​ is removed during the ''​unregister''​ step)
 +
 +  * ''​Ubuntu''​ will still appear in the Microsoft store, and clicking on ''​Launch''​ will trigger a re-installation on ''​C:​\''​
 +    * If you end up with an installation error message and a new //orphan// ''​ext4.vhdx''​ file on ''​C'',​ click on ''​Launch''​ to restart and complete the installation
 +
 +  * ''​Ubuntu''​ will still appear in the list of installed applications (''​Windows''​ + ''​I''​ => ''​Applications''​) but with a smaller disk usage, probably just the size of the //Linux kernel// installed and updated independently of the Linux installations)
  
 === Removing WSL === === Removing WSL ===
other/win10wsl.txt · Last modified: 2023/12/06 13:24 by jypeter