Skip to content

Instantly share code, notes, and snippets.

@qianbinbin
Created October 16, 2020 08:53
Show Gist options
  • Save qianbinbin/977a9159c1bc47c155fe14608a4348bb to your computer and use it in GitHub Desktop.
Save qianbinbin/977a9159c1bc47c155fe14608a4348bb to your computer and use it in GitHub Desktop.
Reset Jetbrains trial for macOS
#!/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"
@qianbinbin
Copy link
Author

qianbinbin commented Feb 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment