This process is how I went through upgrading my WSL Distro. This process completed an in place up grade of the system. I could have just re downloaded the new distro as I hadn’t save much content to the image. But as I plan on doing so this was a good chance to go through the process.
Checking the current version
Returns the following,
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
Next I needed to make sure that I was on the latest version of the current release.
sudo apt update
sudo apt list --upgradable
sudo apt upgrade
Next I cleaned up any packages that were no longer needed
sudo apt --purge autoremove
Now to update the core manager package
sudo apt install update-manager-core
Finally to start the upgrade
At this point i left the system to do it’s thing and complete the upgrade. This could take some time as it downloads all of the packages that it needs.
During the install you are asked a couple of times to authorize and continue. When this is done the system will restart.
At this point you just need to restart the WSL terminal session and check the version.
and the output returned is.
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal