Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"rm: cannot remove 'wslServer.sh': No such file or directory"

In my ongoing war with WSL2/VSCODE I'm trying to completely remove the .vscode-insiders directory from my machine.

rm -rf wont work, neither will delete from windows. Anyone know How I can destroy this thing?

I'm trying to get a dev environment set up with WSL2 VS CODE and Docker in Windows 10 insiders (18965). I ran into problems trying to install the remote development pack, specifically the /ms-vscode-remote.remote-wsl-0.39.4 extension which is causing no end of problems. However When I try to remove all vs code-insiders residue I get permissions problems with: :/mnt/c/Users/micro/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.39.4/scripts/wslServer.sh

I cant delete it from the Ubuntu side with rm -rf cannot remove 'wslServer.sh': No such file or directory

I cant delete it from windows explorer - no permissions

I cant delete it from powershell as admin running Remove-item.

Looked at all the existing answers on stack and none have a solution as far as i can see.

Would love some help?

Remove-Item : Access is denied At line:1 char:1 + Remove-Item wslServer.sh + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (C:\Users\micro...ts\wslServer.sh:String) [Remove-Item], Unauthorized AccessException + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.RemoveItemCommand

Remove-Item : Cannot find path 'C:\Users\micro.vscode-insiders\extensions\ms-vscode-remote.remote-wsl-0.39.4\scripts\wslServer.sh' because it does not exist. At line:1 char:1 + Remove-Item wslServer.sh + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Users\micro...ts\wslServer.sh:String) [Remove-Item], ItemNotFoundEx ception + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

like image 269
Meelos Avatar asked Oct 23 '25 17:10

Meelos


1 Answers

Ctrl+alt+delete - right click 'Windows Subsystem For Linux' - end task.

Now try deleting the folder or let VScode do it for you.

like image 91
Nico Avatar answered Oct 26 '25 08:10

Nico



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!