Skip to content

Instantly share code, notes, and snippets.

@mudassaralichouhan
Created June 23, 2025 15:29
Show Gist options
  • Save mudassaralichouhan/88e4bcc09bce506b9f4b12f056c08b1a to your computer and use it in GitHub Desktop.
Save mudassaralichouhan/88e4bcc09bce506b9f4b12f056c08b1a to your computer and use it in GitHub Desktop.
#!/bin/sh
# Script to reset trial period for PhpStorm 2025.1.1 on macOS
product="PhpStorm"
echo "Closing $product"
ps aux | grep -i "$product" | grep -v grep | awk '{print $2}' | xargs kill -9
echo "Resetting trial period for $product"
echo "Removing evaluation key..."
rm -rf ~/Library/Preferences/$product*/eval
rm -rf ~/Library/Application\ Support/JetBrains/$product*/eval
echo "Removing all evlsprt properties in options.xml..."
sed -i '' '/evlsprt/d' ~/Library/Preferences/$product*/options/other.xml
sed -i '' '/evlsprt/d' ~/Library/Application\ Support/JetBrains/$product*/options/other.xml
echo
echo "Removing additional plist files..."
rm -f ~/Library/Preferences/com.apple.java.util.prefs.plist
rm -f ~/Library/Preferences/com.jetbrains.*.plist
rm -f ~/Library/Preferences/jetbrains.*.*.plist
echo "Restarting cfprefsd"
killall cfprefsd
echo
echo "That's it, enjoy ;)"
@mudassaralichouhan
Copy link
Author

It looks like you have a comprehensive script and guide for resetting the trial period of JetBrains IDEs on macOS. Below, I will provide a modified version of your script specifically for PhpStorm 2025.1.1 and include additional instructions for uninstalling and reinstalling the IDE, as well as resetting the trial period.

Modified Script for PhpStorm 2025.1.1

#!/bin/sh

# Script to reset trial period for PhpStorm 2025.1.1 on macOS

product="PhpStorm"

echo "Closing $product"
ps aux | grep -i "$product" | grep -v grep | awk '{print $2}' | xargs kill -9

echo "Resetting trial period for $product"

echo "Removing evaluation key..."
rm -rf ~/Library/Preferences/$product*/eval
rm -rf ~/Library/Application\ Support/JetBrains/$product*/eval

echo "Removing all evlsprt properties in options.xml..."
sed -i '' '/evlsprt/d' ~/Library/Preferences/$product*/options/other.xml
sed -i '' '/evlsprt/d' ~/Library/Application\ Support/JetBrains/$product*/options/other.xml

echo
echo "Removing additional plist files..."
rm -f ~/Library/Preferences/com.apple.java.util.prefs.plist
rm -f ~/Library/Preferences/com.jetbrains.*.plist
rm -f ~/Library/Preferences/jetbrains.*.*.plist

echo "Restarting cfprefsd"
killall cfprefsd

echo
echo "That's it, enjoy ;)"

Steps to Completely Uninstall and Reinstall PhpStorm

  1. Quit PhpStorm:

    • Ensure that PhpStorm is not running. Quit the application if it is open.
  2. Remove the Application:

    • Open the Applications folder in Finder.
    • Find PhpStorm.app and drag it to the Trash (or right-click and select Move to Trash).
  3. Delete User Configuration and Caches:

    • Open Finder and press Command + Shift + G.
    • Navigate to ~/Library/Application Support/JetBrains/ and delete the folder named PhpStorm2025.1.
    • Go to ~/Library/Caches/JetBrains/ and delete the PhpStorm2025.1 cache directory.
    • Check ~/Library/Preferences/ for any JetBrains or PhpStorm-specific files and delete them, including any .plist files.
  4. Empty Trash:

    • After deleting the above files and directories, empty your Trash to permanently remove them from the system.
  5. Run the Reset Script:

    • Save the modified script above as reset_phpstorm_trial.sh.
    • Open Terminal and navigate to the directory where you saved the script.
    • Run the script with the command:
      sh reset_phpstorm_trial.sh
  6. Reinstall PhpStorm:

    • Download the latest version of PhpStorm from the JetBrains website.
    • Open the downloaded .dmg file and drag the PhpStorm icon into your Applications folder.
  7. Start PhpStorm:

    • Open PhpStorm.app from your Applications folder. Since you removed all previous configurations, it will start as if for the first time.
  8. Resetting the Free Trial:

    • If prompted, choose to start a new trial. If you had previously logged in with a JetBrains account, consider using a different account or not logging in at all to attempt to reset the trial period.

Disclaimer

Please note that attempting to reset the trial period may violate JetBrains' terms of service. The recommended approach is to purchase a license or contact JetBrains for an extended evaluation if needed. Use the above methods at your own risk.

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