How to Remove Unused PHP Versions in CyberPanel?

To remove unused PHP versions, follow these steps

Step 1: Log in to Your Server via SSH
Use an SSH client (like Terminal or PuTTY) to access your server:

ssh root@your-server-ip

If you are on Windows use Bitvise to access your server via SSH.

Step 2: Remove Unused PHP Versions
Identify and remove the PHP versions you no longer need. For example, to remove PHP 7.4 version:
Ubuntu:

apt remove lsphp74 lsphp74-common

Centos/Almalinux:

dnf remove lsphp74 lsphp74-common

Replace lsphp74 with the version you want to remove. You can repeat this for each unwanted version.

Step 3: Verify in CyberPanel

  1. Log in to CyberPanel.
  2. Go to PHP → Install PHP.
  3. Confirm that the removed versions no longer appear in the list.

1 Like