Remove .NET on WSL2
For Ubuntu:
- First list the dotnet packages installed:
sudo apt --installed list | grep "dotnet"
- You'll have a result like this:
dotnet-apphost-pack-3.0 dotnet-hostfxr-3.1 dotnet-runtime-deps-5.0dotnet-apphost-pack-3.1 dotnet-hostfxr-5.0 dotnet-sdk-5.0dotnet-apphost-pack-5.0 dotnet-runtime-5.0 dotnet-targeting-pack-3.0dotnet-host dotnet-runtime-deps-2.2 dotnet-targeting-pack-3.1dotnet-hostfxr-2.2 dotnet-runtime-deps-3.0 dotnet-targeting-pack-5.0dotnet-hostfxr-3.0 dotnet-runtime-deps-3.1
- To uninstall the packages of linked to version 3 for example just type:
$ sudo apt-get remove --purge dotnet-*3*
Credit
Loading comments...