let's add why this: wsl.exe sudo e2fsck -f /dev/<device> will not work, why we need another distribution to repair your broken distribution instead of leting the --distribution flag blank and wsl will use the default distribution to repair the default distribution and then cause Another program is using this file and the process cannot access it error.
Documentation Issue
see:
https://github.com/microsoft/WSL/issues/10169
I guess the related document is outdated or incompleted.Link to documentation page
https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-repair-a-vhd-mounting-error
Suggested Improvements
let's add why this:
wsl.exe sudo e2fsck -f /dev/<device>
will not work, why we need another distribution to repair your broken distribution instead of leting the--distribution
flag blank andwsl
will use the default distribution to repair the default distribution and then causeAnother program is using this file and the process cannot access it
error.