Skip to content

Instantly share code, notes, and snippets.

@vizee
Created April 16, 2023 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vizee/3fdc544520d2909c431c1df1f23821fa to your computer and use it in GitHub Desktop.
Save vizee/3fdc544520d2909c431c1df1f23821fa to your computer and use it in GitHub Desktop.
clean vscode server
#!/bin/bash
set -e
cd $HOME/.vscode-server
for f in $(ls -1 --sort=time .*.token | tail -n +2); do
id=${f:1:40}
if [[ -z "$id" ]]; then
echo "invalid file $f"
exit 1
fi
echo "clean $id"
rm ".$id.log" ".$id.pid" ".$id.token"
rm -rf "bin/$id"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment