I was run Docker Desktop on Windows 10 under WSL 1, then I tried to migrate to WSL 2 and somehow broke it, I can neither uninstall nor install a newer version of Docker. An attempt to delete docker files on a disk failed with an access error even under local admin. In my case, the problem was in conflict between the process of installation/uninstallation of Docker and some Docker services that were simultaneously running at that moment and somehow blocking it.
I fixed it by doing these steps:
1 delete Docker VM in Windows Hyper-V Manager
2 stop Docker service in Windows Service Manager
3 then I was able to delete all docker files on a disk (C:\Program Files\Docker)
4 download and install a fresh version of Docker
5 at that point it was still broken so I repeated steps 1 and 2 and then uninstalled it “normally” through windows Programs and Features > Uninstall
6 install Docker again, and at that point it was finally work
Hope it will help someone, cheers!