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
-
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
-
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.
-
Connect to the server via SSH
-
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 withEXT
. "PLSK.01234567" is to be replaced with the actual license number.# egrep -Rl "PLSK.01234567" /etc/sw/keys/keys/key* | xargs -i rm -rf {}
-
Restart sw-engine service:
# service sw-engine restart