Switch Composer to Version 1
If you are currently on version 2 then you can run the command like below to change to version one.
composer self-update --1
Switch Composer to Version 2
Otherwise, if you are already on version 1 then you can specify the version 2.
composer self-update --2
Do note that the "--1" or "--2" version flag is necessary to indicate the version you are switching into.
Switch to Specific Version Number
To switch the version to a specific one you can pass on the exact version number as required like below.
composer self-update 1.10.22 composer self-update 2.1.3