What I don't understand is I uninstalled Ubuntu and still same error.
If you uninstalled Ubuntu through Windows, what you installed and (presumably) reinstalled was not your distribution. That is just the "template" (rootfs) for the distribution that is created the first time you run the app. See this answer and/or this answer to understand more about that.
Is there a possibility to reset all on my laptop and reinstall everything ?
Sure, and that's probably the easiest path if you don't have any critical files in Ubuntu. Keep in mind that this is a destructive operation and all files in the Ubuntu distribution (but not Windows) will be removed.
From PowerShell:
wsl -l -v
# Confirm the distro name - Likely Ubuntu
wsl --unregister <distro_name>
Then simply rerun:
ubuntu.exe
# Or ubuntu2004.exe, ubuntu2204.exe, etc.
It will ask for the username and password that you want to use, similar to the way it did the first time you installed.
Then start as you would with a fresh installation:
sudo apt update && sudo apt upgrade -y
Now I have the following errors when I launch Ubuntu. I really don't know what to do
It looks like you may have done a recursive chown
at the root level. In that case, it might be tough to recover all ownership exactly as-it-was. In general:
As far as I know, all files in /usr
and /bin
should be root-owned.
Files in /var
will all be root-owned in a "default" installation, but additional programs (such as a mail or print server, which are rarely used under WSL) could mean user-owned files in /var
.
/etc
files are, in my experience, are usually owned by root, but additional services might install configuration files that are owned by a different user and/or group.
/home/<user>
files should typically be owned by your user.
/root
files should obviously be owned by root.
/tmp
will vary, but (as they are all temp files anyway) it should be safe to remove anything left in there and start over.
Probably missed an import FHS directory somewhere in that list, but I'm going from memory at the moment.