Skip to content

Instantly share code, notes, and snippets.

@XGilmar
Last active February 24, 2025 02:41
Show Gist options
  • Save XGilmar/55f6727a40f78979a6a7f8d5885e3bdd to your computer and use it in GitHub Desktop.
Save XGilmar/55f6727a40f78979a6a7f8d5885e3bdd to your computer and use it in GitHub Desktop.
Script JetBrains trial reset
#!/bin/bash
# Colors for terminal output
RED='\033[0;31m'
GREEN='\033[0;92m'
YELLOW='\033[0;33m'
BLUE='\033[0;94m'
PURPLE='\033[0;95m'
CYAN='\033[1;96m'
WHITE='\033[0;97m'
NC='\033[0m' # No Color
#~/.config/JetBrains/
config_path=~/.config/JetBrains/
# Version variables for JetBrains products
intellij_idea_version="IntelliJIdea"
webstorm_version="WebStorm"
datagrip_version="DataGrip"
phpstorm_version="PhpStorm"
clion_version="CLion"
pycharm_version="PyCharm"
goland_version="GoLand"
rubymine_version="RubyMine"
# Function to clear the screen
clear_screen() {
clear
}
# Function to display the menu
show_menu() {
clear_screen
echo -e "${CYAN}---- RESET TRIAL IDE 1.0 ----${NC}"
echo -e "[${BLUE}0${NC}] ${PURPLE}All IDE${NC}"
echo -e "[${BLUE}1${NC}] ${WHITE}$intellij_idea_version${NC}"
echo -e "[${BLUE}2${NC}] ${WHITE}$webstorm_version${NC}"
echo -e "[${BLUE}3${NC}] ${WHITE}$datagrip_version${NC}"
echo -e "[${BLUE}4${NC}] ${WHITE}$phpstorm_version${NC}"
echo -e "[${BLUE}5${NC}] ${WHITE}$clion_version${NC}"
echo -e "[${BLUE}6${NC}] ${WHITE}$pycharm_version${NC}"
echo -e "[${BLUE}7${NC}] ${WHITE}$goland_version${NC}"
echo -e "[${BLUE}8${NC}] ${WHITE}$rubymine_version${NC}"
echo -e "[${BLUE}q${NC}] ${GREEN}Quit${NC}"
echo -e "${CYAN}-------------------------${NC}"
}
# Function to reset trial period for all products
reset_all() {
for product in $intellij_idea_version $webstorm_version $datagrip_version $phpstorm_version $clion_version $pycharm_version $goland_version $rubymine_version; do
reset_application $product
done
}
# Function to reset trial period for a specific product
reset_application() {
local product_name=$(basename $config_path"$1"*)
local name_path=$config_path"$product_name"
#echo -e "${GREEN}config located: $name_path"
if [ -d $name_path ]; then
echo -e "${BLUE}[+] Resetting trial period for ${CYAN}$product_name${NC}"
# Remove Evaluation Key
echo -e "${BLUE}[+] Removing Evaluation Key..."
rm -rf ~/.config/JetBrains/$product_name*/eval &>/dev/null
if [ $? -eq 0 ]; then
echo -e "${GREEN}[+] Evaluation Key removed successfully${NC}"
else
echo -e "${RED}[!] Failed to remove Evaluation Key${NC}"
fi
# Remove evlsprt properties from options.xml
echo -e "${BLUE}[+] Removing all evlsprt properties in options.xml..."
sed -i 's/evlsprt//' ~/.config/JetBrains/$product_name*/options/other.xml &>/dev/null
if [ $? -eq 0 ]; then
echo -e "${GREEN}[+] evlsprt properties removed successfully.${NC}"
else
echo -e "${RED}[!] Failed to remove evlsprt properties.${NC}"
fi
# Remove userPrefs files
echo -e "${BLUE}[+] Removing userPrefs files..."
rm -rf ~/.java/.userPrefs &>/dev/null
if [ $? -eq 0 ]; then
echo -e "${GREEN}[+] userPrefs files removed successfully.${NC}"
else
echo -e "${RED}[!] Failed to remove userPrefs files.${NC}"
fi
else
echo -e "${YELLOW}[warn] Directory for ${WHITE}$product_name${YELLOW} does not exist.${NC}"
fi
}
# Function to validate user selection
validate() {
case $application in
0)
reset_all
;;
1|2|3|4|5|6|7|8)
local application_name=""
case $application in
0)
application_name="All IDE"
;;
1)
application_name=$intellij_idea_version
;;
2)
application_name=$webstorm_version
;;
3)
application_name=$datagrip_version
;;
4)
application_name=$phpstorm_version
;;
5)
application_name=$clion_version
;;
6)
application_name=$pycharm_version
;;
7)
application_name=$goland_version
;;
8)
application_name=$rubymine_version
;;
esac
reset_application $application_name
;;
q|Q)
echo -e "${GREEN}========= Exit =========="
exit 0
;;
*)
echo -e "${RED}[!] Invalid selection${NC}"
;;
esac
}
# Display the menu and read user selection
show_menu
echo -e -n "${WHITE}select option:${NC}"
read application
echo -e "${CYAN}-------------------------${NC}"
# Validate user selection
validate
@coderriot
Copy link

For macos try these
plutil -remove "/.JetBrains\.UserIdOnMachine" ~/Library/Preferences/com.apple.java.util.prefs.plist
plutil -remove "/.jetbrains/.user_id_on_machine" ~/Library/Preferences/com.apple.java.util.prefs.plist
plutil -remove "/.jetbrains/.device_id" ~/Library/Preferences/com.apple.java.util.prefs.plist

If doesnt work try
plutil -convert xml1 ~/Library/Preferences/com.apple.java.util.prefs.plist
edit the file and remove jetbrains keys above and save

@XGilmar
Copy link
Author

XGilmar commented May 15, 2024

For macos try these plutil -remove "/.JetBrains\.UserIdOnMachine" ~/Library/Preferences/com.apple.java.util.prefs.plist plutil -remove "/.jetbrains/.user_id_on_machine" ~/Library/Preferences/com.apple.java.util.prefs.plist plutil -remove "/.jetbrains/.device_id" ~/Library/Preferences/com.apple.java.util.prefs.plist

If doesnt work try plutil -convert xml1 ~/Library/Preferences/com.apple.java.util.prefs.plist edit the file and remove jetbrains keys above and save

Did it work for you? I need to update my application for the Mac OS environment.

@DmitriiRogovoi
Copy link

haven't tried yet. a lot of work piled up. I will check a little later and write back

@DmitriiRogovoi
Copy link

It does not work for me

@coderriot
Copy link

Did it work for you? I need to update my application for the Mac OS environment.

I suppose it depends on the structure of the file, check you file using
plutil -p ~/Library/Preferences/com.apple.java.util.prefs.plist

You can also try moving the file.
Remember to close all jetbrains app

@vuduckhoia1
Copy link

Thank you, it works

@vrnkx
Copy link

vrnkx commented May 30, 2024

Just tried it on Goland 2024.1.2, it worked perfectly, thank you so much

@YaroLuck
Copy link

YaroLuck commented Jun 3, 2024

Just tried script on Pycharm 2024.1 and Webstorm 2024.1.

Works like a charm. Thank you!

@hmtanbir
Copy link

Is there any script for MAC OS ?

@XGilmar
Copy link
Author

XGilmar commented Jun 12, 2024

Is there any script for MAC OS ?

This script is only for Linux, this repo has what you need https://github.com/XGilmar/JetBrains-reset-trial-app

@hmtanbir
Copy link

@XGilmar I have downloaded from the link https://github.com/XGilmar/JetBrains-reset-trial-app but I could not able to install it in Mac OS. Could you please add installation guide in your repo?

@XGilmar
Copy link
Author

XGilmar commented Jun 12, 2024

@XGilmar I have downloaded from the link https://github.com/XGilmar/JetBrains-reset-trial-app but I could not able to install it in Mac OS. Could you please add installation guide in your repo?

This is just an executable, depending on your operating system you must install java and open the executable.

@IlyaIvanchikov
Copy link

thank you!

@DanielOberlechner
Copy link

Java program works from @XGilmar tried it today with WebStorm on macOS Sonoma and it works like excpected!
Thank you for your time.

Greets Daniel

@benzmsts
Copy link

benzmsts commented Aug 2, 2024

I downloaded this GitHub repository, and it works on my Intel MacBook, but it is not working on my M1 MacBook. Could you fix this? Thank you.

@DanielOberlechner
Copy link

@benzmsts
I have run that program on my Macbook Pro M1 Max and it works like expected. There should be no reason why it works on Intel Macbooks but not on Apple ARM.

Gotta debug a little bit and find the issue, like I've told on my machine it works...

@benzmsts
Copy link

benzmsts commented Aug 2, 2024

@DanielOberlechner The problem is that the machine can't find the plist file in the ../Performances/ directory.

Screenshot 2567-08-03 at 01 39 32

@XGilmar
Copy link
Author

XGilmar commented Aug 2, 2024

@DanielOberlechner The problem is that the machine can't find the plist file in the ../Performances/ directory.

It is not working well in the Mac environment, I need a partner who can use their Mac to figure out the problem as I do not have one.

@DanielOberlechner
Copy link

@XGilmar
I own a Macbook Pro with M1 Max but on my machine it works like expected.
Anything I can do to help this issue that its not finding the plist files like in the screenshot from @benzmsts ?

@DanielOberlechner
Copy link

Due to the fact that this solution is not working anymore I found a new one working on all OS.
Simlpy try it out.

https://rentry.co/jetbrainsfree

It was recommened on reddit where XGilmar posted his solution:
https://www.reddit.com/r/Piracy/comments/1e5c3q8/jetbrains_reset_trial/

Works on all Jetbrains products but requires a bit of working around.

For questions just hit me up if you got problems.

@XGilmar
Copy link
Author

XGilmar commented Oct 11, 2024

@XGilmar I own a Macbook Pro with M1 Max but on my machine it works like expected. Anything I can do to help this issue that its not finding the plist files like in the screenshot from @benzmsts ?

Yes, I will be grateful if someone can help me using their Mac to solve the routing problem.

@DanielOberlechner
Copy link

@XGilmar
Just tell me how I can help you. to contact me visit my github profile.

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