Created
October 16, 2020 08:53
-
-
Save qianbinbin/977a9159c1bc47c155fe14608a4348bb to your computer and use it in GitHub Desktop.
Reset Jetbrains trial for macOS
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 | |
JB_PATH=~/"Library/Application Support/JetBrains" | |
KEY=com.apple.java.util.prefs | |
echo "Deleting defaults for $KEY" | |
defaults delete "$KEY" | |
echo | |
for f in ~/Library/Preferences/jetbrains.*.plist; do | |
[ -f "$f" ] || continue | |
k=${f##*/} | |
k=${k%.*} | |
echo "Deleting defaults for $k" | |
defaults delete "$k" | |
echo "Removing $f" | |
rm "$f" | |
done | |
echo | |
for d in "$JB_PATH"/*; do | |
[ -d "$d/eval" ] || continue | |
echo "Removing $d/eval" | |
rm -rf "$d/eval" | |
done | |
echo | |
for f in "$JB_PATH"/*/options/other.xml; do | |
[ -f "$f" ] || continue | |
grep evlsprt "$f" >/dev/null || continue | |
echo "Deleting evlsprt from $f" | |
cp "$f" "$f.bak" && sed -i "" '/evlsprt/d' "$f" | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Last versions of which trial can be reset:
intellij-idea: 2021.2.2,212.5284.40
clion:
2021.2.2,212.5284.51
pycharm:
2021.2.2,212.5284.44
How to install history versions: https://stackoverflow.com/questions/58373704/homebrew-how-do-you-specify-a-version-using-brew-cask