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
- Log in to CyberPanel.
- Go to PHP → Install PHP.
- Confirm that the removed versions no longer appear in the list.