the problem occurred after removing visual code studio (vscode) remote ssh from the client. By uninstalling Remote SSH in an attempt was done to free up memory taken on host computer.
Asked
Active
Viewed 1.0k times
2 Answers
2
I learnt that the folder under .vscode_server/ have two subfolder and I wanted to remove the folder since the some extentions was taking too much space, it was
rm -rf .vscode-server/
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs000000000428ac6a000005ce’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs0000000006b42642000005f6’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs0000000006c122f3000005fe’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs000000000609731e00000607’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs000000000154ec5400000623’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs00000000015e1f560000062d’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs0000000007fa221c00000632’: Device or resource busy
rm: cannot remove ‘.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/.nfs00000000011f979d00000643’: Device or resource busy
cd .vscode-server/
ls
bin/ extensions/
cd extensions
ls
ms-vscode.cpptools-0.26.3
cd ms-vscode.cpptools-0.26.3
ls
bin
ls
.nfs0000000005615fa900000b1b* .nfs0000000005615faa00000b1c*
rm -rf .nfs0000000005615fa900000b1b
rm: cannot remove ‘.nfs0000000005615fa900000b1b’: Device or resource busy
lsof .nfs0000000005615fa900000b1b**
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Microsoft 966 xxxxxx txt REG 0,40 14250189 90267561 .nfs0000000005615fa900000b1b
Microsoft 1145 xxxxxx txt REG 0,40 14250189 90267561 .nfs0000000005615fa900000b1b
Microsoft 1642 xxxxxx txt REG 0,40 14250189 90267561 .nfs0000000005615fa900000b1b
.... many line here ....
Here I used notepad++ to kill all sub-process running
kill -9 966
kill -9 1145
kill -9 1642
... etc
so finally the process .nfs0000000005615fa900000b1b was removed
you need to that for all process but start from the subprocesses. I am sure some genius will do this effectively and fast. But I was happy that I finally could get rid of .vscode-server folder.
Hope this was helpful!

DazBaldwin
- 4,125
- 3
- 39
- 43

dochoex
- 191
- 1
- 3
- 11
2
I used
ps -aux | grep vscode
to find and kill all the processes associated with vscode. Then I deleted the folder with rm -rf ~/.vscode-server

Harsh
- 77
- 2
- 8