How can I downgrade composer 2?
First you will need to download the older RPM from httpupdate server. You can install this package on your server using the command:
Next, remove composer 2:
rpm -e cpanel-php-composer-2.0.6-1.cp1186.noarch
Install the new older 1.8.6 RPM with the following.
rpm -ivh cpanel-php-composer-1.8.6-1.cp1186.noarch.rpm
Verify the package installed correctly
rpm -ql cpanel-php-composer-1.8.6-1.cp1186.noarch
Next, set the target to uninstalled
/usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.composer unmanaged
And finally, verify the installed composer version.
Completing the above steps will downgrade Composer and prevent cPanel from updating the Composer version.
Note that only the following versions of Composer are available in the repository.