-
-
Save yugoslavskiy/8c51a6af08b58f42dccc to your computer and use it in GitHub Desktop.
Script to clean Sublime Text 3 caches, sessions and workspaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# original file: | |
# https://gist.github.com/gerardroche/6e46cbdf8da19a39f9da | |
set -e | |
unset CDPATH | |
unset IFS | |
[ $( uname -s ) = "Darwin" ] && ST3_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 | |
[ $( uname -s ) = "Linux" ] && ST3_PATH=~/.config/sublime-text-3 | |
echo "[*] remove cache..." | |
rm -rfv "${ST3_PATH}"/Packages/.logs/ | |
rm -rfv "${ST3_PATH}"/Backup/ | |
rm -rfv "${ST3_PATH}"/Cache/ | |
rm -rfv "${ST3_PATH}"/Index/ | |
rm -rfv "${ST3_PATH}"/Settings/ | |
echo "[*] remove sesions..." | |
rm -fv "${ST3_PATH}"/Local/*.sublime_session | |
echo "[*] remove workspaces..." | |
sudo find / -type f -name '*.sublime-workspace' -exec rm -fv {} + 2>/dev/null | |
echo "" | |
echo "[*] sublime-clean: Done." | |
echo "" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment