Skip to content

Instantly share code, notes, and snippets.

@lopesivan
Created April 26, 2026 08:32
Show Gist options
  • Select an option

  • Save lopesivan/fa0c40071149a041f0f41fa8846e4674 to your computer and use it in GitHub Desktop.

Select an option

Save lopesivan/fa0c40071149a041f0f41fa8846e4674 to your computer and use it in GitHub Desktop.
teardown-workspace.sh
#!/bin/bash
echo "Tearing down workspace ..."
if [ -f /tmp/workspace-activated ]; then
rm /tmp/workspace-activated
dirs=(CLionProjects
IdeaProjects
PhpstormProjects
PycharmProjects
RiderProjects
RubymineProjects
unity
AndroidStudioProjects
WebstormProjects
DialogBlocksProjects
GolandProjects
vpworkspace)
for d in ${dirs[*]}; do
test -d /workspace/"$d" && rm -rf /workspace/"$d"
# if exist link `~/$d' then remove.
_l=/home/ivan/$d
test -L "$_l" && rm "$_l"
done
# TARGET=/workspace
# rm -rf ${TARGET}/.* ${TARGET}/*
else
echo "Doesnt seem to be up: Skipping ..."
fi
rm -rf /workspace/go
#rm /home/ivan/go/1.14.4/src
rm /home/ivan/go/1.21.3/src
/home/linuxbrew/.linuxbrew/bin/jetbrain_killer force
rm -rf /workspace/.config /home/ivan/.config/VisualParadigm
rm -rf /workspace/.npm /home/ivan/.npm
rm -rf /workspace/.java /home/ivan/.java
rm -rf /workspace/.cache /home/ivan/.cache
rm -rf /workspace/.local /home/ivan/.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment