Check the latest version here: https://github.com/docker/compose/releases
Check if the docker-compose is installed in these directories:
ls -l /usr/bin/docker-compose
OR
ls -l /usr/local/bin/docker-compose
Once found, rename it to something like docker-compose-<version.number>
Now download the desired version (one of the versions as found in the github releases above) and save it to the bin location:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Now make it executable by doing:
sudo chmod +x /usr/local/bin/docker-compose
Now check the version to confirm:
docker-compose version