Skip to content

Instantly share code, notes, and snippets.

@h3ssan
Last active July 21, 2024 01:10
Show Gist options
  • Save h3ssan/9510fbb2291d41b090cf52adb2edd1c4 to your computer and use it in GitHub Desktop.
Save h3ssan/9510fbb2291d41b090cf52adb2edd1c4 to your computer and use it in GitHub Desktop.
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    echo "[+] Resetting trial period for $product"

    echo "[+] Removing Evaluation Key..."
    rm -rf ~/.config/$product*/eval 2> /dev/null

    # Above path not working on latest version, Fixed below
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null

    echo "[+] Removing all evlsprt properties in options.xml..."
    sed -i 's/evlsprt//' ~/.config/$product*/options/other.xml 2> /dev/null

    # Above path not working on latest version, Fixed below
    sed -i 's/evlsprt//' ~/.config/JetBrains/$product*/options/other.xml 2> /dev/null

    echo
done

echo "Removing userPrefs files..."
rm -rf ~/.java/.userPrefs 2> /dev/null

If not works on Mac OS, then run the following code:

rm -rf ~/Library/Preferences/com.apple.java.util.prefs.plist
@TCAby
Copy link

TCAby commented May 7, 2024

thank you, bro! working well!

@rachha
Copy link

rachha commented May 15, 2024

the .config directory is empty

@h3ssan
Copy link
Author

h3ssan commented May 15, 2024

the .config directory is empty

@rachha which OS are you using?

@rachha
Copy link

rachha commented May 16, 2024

macOS Sonoma(14.0)

@LinuxGik
Copy link

LinuxGik commented Jun 1, 2024

💥 💥 💥 ❤️ ❤️ ❤️ 💋 💋 💋 💋 💋 💋

@VlasenkoDmitry
Copy link

THX

@mohamedmoussasoli
Copy link

Screenshot 2024-06-05 at 10 46 34 PM Still gives me this after running this script for mac os

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
echo "[+] Resetting trial period for $product"

echo "[+] Removing Evaluation Key..."
rm -rf ~/Library/Preferences/$product*/eval 2> /dev/null

echo "[+] Removing all evlsprt properties in options.xml..."
sed -i '' 's/evlsprt//' ~/Library/Preferences/$product*/options/other.xml 2> /dev/null

echo

done

echo "Removing userPrefs files..."
rm -rf ~/Library/Preferences/.java/.userPrefs 2> /dev/null

@h3ssan
Copy link
Author

h3ssan commented Jun 5, 2024

Hi @mohamedmoussasoli ,

please try execute this code:

I did some changes

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    echo "[+] Resetting trial period for $product"

    echo "[+] Removing Evaluation Key..."
    rm -rf ~/Library/Preferences/$product*/eval 2> /dev/null

    rm -rf ~/Library/Application\ Support/JetBrains/$product*/eval

    echo "[+] Removing all evlsprt properties in options.xml..."
    sed -i '' 's/evlsprt//' ~/Library/Preferences/$product*/options/other.xml 2> /dev/null

    sed -i '' '/evlsprt/d' ~/Library/Application\ Support/JetBrains/$product*/options/other.xml


    echo
done

echo "Removing userPrefs files..."
rm -rf ~/Library/Preferences/.java/.userPrefs 2> /dev/null

Let me know if it works

@mohamedmoussasoli
Copy link

Hello @h3ssan
Thanks for your response, but still the same thing
I am using phpstorm 2024.1.2

@h3ssan
Copy link
Author

h3ssan commented Jun 5, 2024

@mohamedmoussasoli

Did you closed phpstorm before executing the code?

@shakedZeira
Copy link

Hi there, im using Clion 2019.3.2 and it doesn't work for me,
are there any specific versions of clion you tried?

@partho5
Copy link

partho5 commented Jun 8, 2024

2nd script worked for me. Ubuntu 22.

@shakedZeira
Copy link

@partho5 which version of Clion are you using?

@h3ssan
Copy link
Author

h3ssan commented Jun 9, 2024

Hi @shakedZeira ,

This script works for the latest version, try with 2024 versions

@arturoodev
Copy link

For mac not work :(

Hi @mohamedmoussasoli ,

please try execute this code:

I did some changes

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    echo "[+] Resetting trial period for $product"

    echo "[+] Removing Evaluation Key..."
    rm -rf ~/Library/Preferences/$product*/eval 2> /dev/null

    rm -rf ~/Library/Application\ Support/JetBrains/$product*/eval

    echo "[+] Removing all evlsprt properties in options.xml..."
    sed -i '' 's/evlsprt//' ~/Library/Preferences/$product*/options/other.xml 2> /dev/null

    sed -i '' '/evlsprt/d' ~/Library/Application\ Support/JetBrains/$product*/options/other.xml


    echo
done

echo "Removing userPrefs files..."
rm -rf ~/Library/Preferences/.java/.userPrefs 2> /dev/null

Let me know if it works

@mantegnous
Copy link

no work..

@leitge
Copy link

leitge commented Jun 25, 2024

any updates here from anybody using macOS?

@efleon9
Copy link

efleon9 commented Jun 25, 2024

Working well on Ubuntu 22.04.

Thanks a lot!

@apologG
Copy link

apologG commented Jul 2, 2024

thanks, bro!

@h3ssan
Copy link
Author

h3ssan commented Jul 2, 2024

any updates here from anybody using macOS?

Don’t know how to get it working on Mac since I only use Linux, so you would wait for updates from the community.

@h3ssan
Copy link
Author

h3ssan commented Jul 3, 2024

@mohamedmoussasoli , @leitge and @mantegnous

To make it works on Mac OS, run the following code:

rm -rf ~/Library/Preferences/com.apple.java.util.prefs.plist

Please let me know if it works for you guys

@zahedul
Copy link

zahedul commented Jul 9, 2024

not working for me on Mac OS

@OrelSokolov
Copy link

Thanks! Works well on Linux July, 2024

@h3ssan
Copy link
Author

h3ssan commented Jul 9, 2024

not working for me on Mac OS

@zahedul have you tried this command:

rm -rf ~/Library/Preferences/com.apple.java.util.prefs.plist

@vitobasso
Copy link

vitobasso commented Jul 15, 2024

Doesn't work for me on Mac OS, unfortunately. Even your last suggestion, @h3ssan.

It finally worked after I:

  • Closed IntelliJ
  • Cleared browser cache
  • Restarted the Mac
  • Deleted the files again

In my case I believe these are the lines that mattered:

rm -rf ~/Library/Preferences/com.apple.java.util.prefs.plist
sed -i '' 's/evlsprt//' ~/Library/Application\ Support/JetBrains/IntelliJIdea2024.1/options/other.xml 2> /dev/null

@zahedul
Copy link

zahedul commented Jul 16, 2024

Doesn't work for me on Mac OS, unfortunately. Even your last suggestion, @h3ssan.

It finally worked after I:

  • Closed IntelliJ
  • Cleared browser cache
  • Restarted the Mac
  • Deleted the files again

In my case I believe these are the lines that mattered:

rm -rf ~/Library/Preferences/com.apple.java.util.prefs.plist
sed -i '' 's/evlsprt//' ~/Library/Application\ Support/JetBrains/IntelliJIdea2024.1/options/other.xml 2> /dev/null

worked

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