This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next 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 15:01] jypeter [Restoring or relocating a Linux installation] Added unregistration step to complete the relocation |
||
---|---|---|---|
Line 1125: | Line 1125: | ||
root@sadira034:~# whoami | root@sadira034:~# whoami | ||
root</code> | root</code> | ||
+ | * If the //relocation// goal was to free up some space on ''C:'', it is possible to [[other:win10wsl#removing_the_main_linux_installation|Remove the main installation]], once the relocated installation has been successfully tested | ||
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 directory, and 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 1158: | ||
* 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 === |