Articles in this section

How to remove a license from Plesk server via CLI?

kb: how-to Plesk for Linux ABT: Group A

Applicable to:

  • Plesk for Linux

Question

How to remove the main license or an additional license from Plesk server via CLI?

Answer

Currently, the utility available to manage Plesk licenses plesk bin license doesn't allow to remove main license or additional licenses, this feature is planned to be included in future Plesk updates.

As a workaround, the following steps are available:

Click on a section to expand

For Plesk Partners
  1. Terminate the license in Key Administrator. As a Plesk Partner, this operation can be performed via Partner API 3.0: Key Administrator Partner API 3.0
  2. Get current license configuration executing the following command on the Plesk server:

    # plesk bin license --retrieve

For non Plesk Partners

Warning: When an additional license is removed, it will be automatically reinstalled again by Plesk daily task. Contact the license provider to perform such task in the license management system.

  • For Plesk on Linux
  1. Connect to the server via SSH.
  2. Find and remove the file which contains this license key using the following command:

    Note: Main license starts with PLSK and additional license keys start with EXT. "PLSK.01234567" is to be replaced with the actual license number.

    # egrep -Rl "PLSK.01234567" /etc/sw/keys/keys/key* | xargs -i rm -rf {}

  3. Restart sw-engine service:

    # service sw-engine restart

  • For Plesk on Windows
  1. Log into the server via RDP.
  2. Remove the registry.xml file from %plesk_dir%admin\repository directory
  3. Remove keyXX files from %plesk_dir%admin\repository\keys directory
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.