How do I uninstall docker-compose?

Documenation

Please note that this is now in the docs.

Coupled Installation and Removal

Note: on Mac Docker now installs Docker Compose. So the strategy for removal has changed a bit. If you uninstall Docker, and you want to uninstall both, then you also uninstall Docker Compose.

Individual Removal if Installed Using curl

It is commonly installed to /usr/local/bin/docker-compose on macs. However, you can run which docker-compose to find the exact location.

Run the following command (*nix systems) to remove:

rm $(which docker-compose)

If you get a permission denied error then you will need to prepend sudo:

sudo rm $(which docker-compose)

To verify that it was successful, run the following command which should return nothing:

which docker-compose

It should say that the command wasn't found.

Individual Removal if Installed Using PIP

If you've installed Docker Compose using PIP then you can run:

pip uninstall docker-compose

You may have to use sudo if you get a permission denied error:

sudo pip uninstall docker-compose

Nowadays docker-compose is part of the docker toolbox.
If you want to remove everything that comes with the Docker Toolbox (including Docker itself).

You can execute this shell script:

#!/bin/bash

# Uninstall Script

if [ "${USER}" != "root" ]; then
    echo "$0 must be run as root!"
    exit 2
fi

while true; do
  read -p "Remove all Docker Machine VMs? (Y/N): " yn
  case $yn in
    [Yy]* ) docker-machine rm -f $(docker-machine ls -q); break;;
    [Nn]* ) break;;
    * ) echo "Please answer yes or no."; exit 1;;
  esac
done

echo "Removing Applications..."
rm -rf /Applications/Docker

echo "Removing docker binaries..."
rm -f /usr/local/bin/docker
rm -f /usr/local/bin/docker-machine
rm -r /usr/local/bin/docker-machine-driver*
rm -f /usr/local/bin/docker-compose

echo "Removing boot2docker.iso"
rm -rf /usr/local/share/boot2docker

echo "All Done!"

If you still have the depreciated Boot2docker and you want to get rid of it as well.

You can uninstall it by executing the following shell script:

#!/bin/bash

# Uninstall Script

if [ "$(which boot2docker)" == "" ]; then
    echo "boot2docker does not exist on your machine!"
    exit 1
fi

if [ "${USER}" != "root" ]; then
    echo "$0 must be run as root!"
    exit 2
fi

echo "Stopping boot2docker processes..."
boot2docker stop && boot2docker delete

echo "Removing boot2docker executable..."
rm -f /usr/local/bin/boot2docker

echo "Removing boot2docker ISO and socket files..."
rm -rf ~/.boot2docker
rm -rf /usr/local/share/boot2docker

echo "Removing boot2docker SSH keys..."
rm -f ~/.ssh/id_boot2docker*

echo "Removing boot2docker OSX files..."
rm -f /private/var/db/receipts/io.boot2docker.*
rm -f /private/var/db/receipts/io.boot2dockeriso.*

echo "Removing Docker executable..."
rm -f /usr/local/bin/docker

echo "All Done!"

first get docker path by:

which docker-compose

then it will return path like:/usr/bin/docker-compose

then remove it:

sudo rm -rf /usr/bin/docker-compose