Good question. The answer is no you shouldn't have to, but it pays to be prepared in case you do. You should be able to migrate your WSL installation from Windows 10 to a Windows 11 upgrade, without deleting any files.
If you choose a Full Upgrade, then your personal files, drivers, apps, and Windows settings should be retained. WSL on Windows 11 is no longer in Windows Features, it is a App downloaded via the Microsoft Store. The Upgrade should perform the necessary update to install that change.
When upgrading, the Official advice is to verify that your computer meets the minimum requirements, and make a backup of personal data and settings. With WSL that means backing up, or copying, the entire
%localappdata%\lxss
folder on your Windows 10 computer, then perform the upgrade.
Once upgraded check your WSL installation with
wsl --list
. If it is not giving what you expect, then perform the following:
2)Install WSL on your new machine (do not create a user account, just control-C out of that prompt).
3)Delete the
%localappdata%\lxss
directory on your new machine.
4)Copy your saved lxss directory to
%localappdata%\lxss
5)run lxrun.exe /setdefaultuser oldusername
6)Launch bash.
Source:
moving WSL installation to another computer
Hope that helps!