Last active
June 21, 2026 18:31
-
-
Save IamMohaiminul/c16a503874be1f66c9e6c2570d12189a to your computer and use it in GitHub Desktop.
Reset JetBrains for macOS
This file contains hidden or 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/zsh | |
| # 1. Close all JetBrains applications | |
| echo "Closing running JetBrains instances..." | |
| jbs=(phpstorm pycharm intellij webstorm datagrip clion goland rider) | |
| for app in "${jbs[@]}"; do | |
| pkill -fi "$app" 2>/dev/null | |
| done | |
| # 2. Define Base Directories | |
| JB_SUPPORT="$HOME/Library/Application Support/JetBrains" | |
| JB_PREFS="$HOME/Library/Preferences" | |
| # 3. Remove all 'eval' folders in all IDE versions | |
| echo "Removing evaluation directories..." | |
| find "$JB_SUPPORT" -name "eval" -type d -exec rm -rf {} + 2>/dev/null | |
| # 4. Clean 'evlsprt' entries from all 'other.xml' files | |
| echo "Cleaning trial metadata from configuration files..." | |
| find "$JB_SUPPORT" -name "other.xml" -type f -exec sed -i '' '/evlsprt/d' {} + 2>/dev/null | |
| # 5. Remove global Java/JetBrains preference plists | |
| echo "Clearing system preference files..." | |
| rm -f "$JB_PREFS/com.apple.java.util.prefs.plist" 2>/dev/null | |
| rm -f "$JB_PREFS/com.jetbrains.*.plist" 2>/dev/null | |
| rm -f "$JB_PREFS/jetbrains.*.plist" 2>/dev/null | |
| # 6. Flush macOS preference cache | |
| echo "Restarting preference daemon..." | |
| killall cfprefsd 2>/dev/null | |
| echo "Universal reset complete. Note: 2026.1+ versions may require an account logout/login." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment