First step, remove the existing version
// If installed via apt-get
sudo apt-get remove docker-compose
// If installed via curl
sudo rm /usr/local/bin/docker-compose
// if installed via pip
pip uninstall docker-compose
Second step, Install the new one (check the latest version from here https://docs.docker.com/compose/install/)
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Third step, make it accessible
sudo chmod +x /usr/local/bin/docker-compose
Fourth, finally check whether version is update
docker-compose --version