A growing WSL distro can consume a system drive even when its visible Linux folders look small. Microsoft supports exporting and importing distributions, but wsl --unregister permanently deletes the registered instance and should never be the first step. A safer move creates an export, imports under a temporary new name to the destination drive and tests real project files before retiring the old registration. This protects databases, SSH configuration and package state that a fresh distro install would not recreate.
Before you start
Measure free space on both drives; an export may require substantial extra room. Save work inside Linux, stop development servers and back up irreplaceable files separately. Record wsl --list --verbose output and your Linux username. If a database runs in WSL, make an application-consistent backup as well; a filesystem export alone may not capture an active database cleanly.Do it step by step
- In PowerShell, run wsl --list --verbose and copy the exact source distro name. Inside Linux, inspect the home directory and project locations you expect to preserve.
- Shut down the distro after closing applications with wsl --terminate followed by its exact name. Use wsl --export with that name and a .tar path on a drive with enough free space; wait for the command to complete.
- Check that the archive exists, is nonzero and can be copied to another location. Keep it outside the WSL installation folder so deleting or moving that folder cannot destroy the only backup.
- Use wsl --import with a distinct temporary distro name, the desired installation folder and the exported tar path. Specify --version 2 if needed; do not overwrite the original registration.
- Launch the new name and inspect project files, package commands, permissions and the default Linux user. Imported distributions may start as root until default-user configuration is restored; fix that before daily use.
- Run a real project smoke test and a database restore check where applicable. Only after both archive and imported distro work should you choose a new default with wsl --set-default and plan removal of the old one.