- How do I uninstall docker-compose?
- 6 Answers 6
- Documenation
- Coupled Installation and Removal
- Individual Removal if Installed Using curl
- Individual Removal if Installed Using PIP
- Uninstall Docker Compose
- Uninstalling Docker Desktop
- Uninstalling the Docker Compose CLI plugin
- Manually installed
- Remove for all users
- Inspect the location of the Compose CLI plugin
- Completely uninstall Docker from Linux #
- Remove Docker Resources #
- Uninstall Docker #
- Uninstall Docker Compose #
- Remove Docker Group #
- Clean Unnecessary Dependencies #
- Uninstall Docker Compose
- Uninstalling Docker Desktop
- Uninstalling the Docker Compose CLI plugin
- Manually installed
- Remove for all users
- Inspect the location of the Compose CLI plugin
- Установка (Удаление) Docker, Docker Compose и Portainer на Ubuntu 20.04 / Debian 10 / Kali Linux … (Сервер, Десктоп, VPS Oracle
- Установка (Удаление) Docker.
- Установка (Удаление) Docker Compose.
How do I uninstall docker-compose?
I installed docker-compose by following the official documentation: http://docs.docker.com/compose/install/ Now I want to uninstall docker-compose.
offers no command for uninstalling, nor does the official documentation offer any instructions. I deleted my docker-compose.yml file and /usr/local/bin/docker-compose, but I want to make sure that’s everything. I’m using OSX Yosemite 10.10.3 on a MacbookPro. EDIT: Regarding the installation instructions I followed, I didn’t use pip. I used the documented curl command:
$ curl -L https://github.com/docker/compose/releases/download/1.3.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose $ chmod +x /usr/local/bin/docker-compose
sudo find / -name «*docker-compose*» -exec rm -r <> \; or to test run just add echo .. sudo find / -name «*docker-compose*» -exec echo rm -r <> \;
Why would you want to do that? It would only delete your local instance of Docker Compose, which comes packaged with a Docker installation.
@ryanwebjackson In 2015 Docker Desktop didn’t exist; docker, docker-compose, and docker-engine were each installed separately. Today I imagine most Mac folks install Docker Desktop. On Linux it’s possible to remove the docker compose plugin and keep the rest. See docs.docker.com/compose/install/uninstall
6 Answers 6
Documenation
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:
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:
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
I sent a PR to the Docker Compose documentation to update it with my answer. It will show up here after a bit: docs.docker.com/compose/install This was the PR: github.com/docker/compose/pull/1619/files
then it will return path like: /usr/bin/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 [ "$" != "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 [ "$" != "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!"
Uninstall Docker Compose
Uninstalling Docker Compose depends on the method you have used to install Docker Compose. On this page you can find specific instructions to uninstall Docker Compose.
Uninstalling Docker Desktop
If you want to uninstall Compose and you have installed Docker Desktop, see Uninstall Docker Desktop.
Note
Unless you have other Docker instances installed on that specific environment, you would be removing Docker altogether by uninstalling the Desktop.
Uninstalling the Docker Compose CLI plugin
To remove the Compose CLI plugin, run:
$ sudo apt-get remove docker-compose-plugin
$ sudo yum remove docker-compose-plugin
Manually installed
If you used curl to install Compose CLI plugin, to uninstall it, run:
$ rm $DOCKER_CONFIG/cli-plugins/docker-compose
Remove for all users
Or, if you have installed Compose for all users, run:
$ rm /usr/local/lib/docker/cli-plugins/docker-compose
Got a Permission denied error?
If you get a Permission denied error using either of the above methods, you do not have the permissions allowing you to remove docker-compose . To force the removal, prepend sudo to either of the above instructions and run it again.
Inspect the location of the Compose CLI plugin
To check where Compose is installed, use:
Completely uninstall Docker from Linux #
This command is being used to list all installed packages and their respective versions. It will help you to quickly view the status of installed packages and can be useful for troubleshooting or determining dependencies between packages.
This command displays a list of installed packages containing the word «docker» (case-insensitive) in their names or descriptions. This command can help you quickly identify the specific version of installed Docker packages and verify their status.
Remove Docker Resources #
sudo docker volume prune -f sudo docker network prune -f sudo docker container prune -f sudo docker image prune -a
The commands volume prune , network prune , container prune and image prune are used to free up disk space in Docker-based systems by removing unused volumes, networks, containers, and images respectively. These commands remove unnecessary resources from the system which optimizes system performance and improves overall efficiency. The -f option is used to force the removal of these resources without prompting for confirmation.
Uninstall Docker #
sudo apt purge docker.io # or sudo apt remove docker.io
This command removes the docker package. The command remove removes the package binaries but its configuration files and installed dependencies will remain in the system. The command purge removes the package as well as its configuration files. But the dependencies will remain in the system. So, it is recommended to use purge command to uninstall docker completely.
Uninstall Docker Compose #
sudo apt purge docker-compose # or sudo apt remove docker-compose
This command will remove docker-compose package from your Linux system. The command remove removes the package binaries but its configuration files and installed dependencies will remain in the system. The command purge removes the package as well as its configuration files. But the dependencies will remain in the system. So, it is recommended to use purge command to uninstall docker completely.
Remove Docker Group #
This command will delete docker group from your Linux system.
Clean Unnecessary Dependencies #
This command removes packages installed as dependencies for other packages but no longer needed. This helps to free up disk space and keep the system clean.
This command removes obsolete package files, freeing up disk space and optimizing system performance.
Finally, you should restart your system and chill for while.
Uninstall Docker Compose
Uninstalling Docker Compose depends on the method you have used to install Docker Compose. On this page you can find specific instructions to uninstall Docker Compose.
Uninstalling Docker Desktop
If you want to uninstall Compose and you have installed Docker Desktop, follow the corresponding link bellow to get instructions on how to remove Docker Desktop.
Note
Unless you have other Docker instances installed on that specific environment, you would be removing Docker altogether by uninstalling the Desktop.
See Uninstall Docker Desktop for: Mac | Windows | Linux.
Uninstalling the Docker Compose CLI plugin
To remove the Compose CLI plugin, run:
$ sudo apt-get remove docker-compose-plugin
$ sudo yum remove docker-compose-plugin
Manually installed
If you used curl to install Compose CLI plugin, to uninstall it, run:
$ rm $DOCKER_CONFIG/cli-plugins/docker-compose
Remove for all users
Or, if you have installed Compose for all users, run:
$ rm /usr/local/lib/docker/cli-plugins/docker-compose
Got a Permission denied error?
If you get a Permission denied error using either of the above methods, you do not have the permissions allowing you to remove docker-compose . To force the removal, prepend sudo to either of the above instructions and run it again.
Inspect the location of the Compose CLI plugin
To check where Compose is installed, use:
Установка (Удаление) Docker, Docker Compose и Portainer на Ubuntu 20.04 / Debian 10 / Kali Linux … (Сервер, Десктоп, VPS Oracle
Это подготовительная часть к следующему посту , в котором мы сделаем HTTPS доступ к Home Assistant Supervised или Home Assistant Core , который так же пригодится нам в дальнейшем для управления колонками с Алисой из Home Assistant … и/или позволит добавить ваши умные устройства из Home Assistant в умный дом Яндекса и управлять ими с любого устройства с Алисой, в том числе с колонок.
Всё будем делать в командной строке.
Для этого, например, подключаемся через PuTTy по SSH к своей реальной или виртуальной машине.
1) Для получения списка новых пактов, выполните:
2) Для выполнения обновления пакетов, выполните:
# sudo apt-get upgrade -y
3) Удаляем возможно оставшиеся зависимости пакетов:
# sudo apt autoremove -y
4) Устанавливаем необходимые нам пакеты и зависимости:
# sudo apt-get install -y python3-pip python-dev libffi-dev libssl-dev gcc libc-dev make curl openssl-dev rust cargo make
Установка (Удаление) Docker.
Docker — программное обеспечение для автоматизации развёртывания и управления приложениями в средах с поддержкой контейнеризации (Контейнеры — это стандартизированная единица программного обеспечения, которая позволяет разработчикам изолировать свое приложение от его среды)
В Ubuntu 20.04 Docker ( docker-ce ) можно установить простым скриптом, введя в терминал всего одну команду, как мы это уже делали в этом посте :
# curl -fsSL get.docker.com | sudo sh
В Ubuntu/ Debian / Kali Linux в официальных репозиториях есть версия Docker — docker.io
Для её установки нужно будет ввести следующие команды:
# sudo apt install -y docker.io
# sudo systemctl enable docker —now
Если вы хотите добавить себя в группу Docker, чтобы использовать Docker без sudo:
# sudo usermod -aG docker $USER
Не имеет особого значения, какую версию Docker (docker-ce или docker.io ) вы установите. Подробнее об этом у меня есть в середине этого поста .
Определить, какой установленный у вас пакет Docker :
# dpkg -l | grep -i docker
Команды для полного удаления Docker.
# sudo apt-get purge -y docker-engine docker docker.io docker-ce
# sudo apt-get autoremove -y —purge docker-engine docker docker.io docker-ce
Приведенные выше команды не будут удалять образы, контейнеры, тома или созданные пользователем файлы конфигурации на вашем хосте. Если вы хотите удалить все изображения, контейнеры и тома, выполните следующие команды:
# sudo rm -rf /var/lib/docker /etc/docker
# sudo rm /etc/apparmor.d/docker
# sudo groupdel docker
# sudo rm -rf /var/run/docker.sock
В результате вы полностью удалили Docker из системы.
Установка (Удаление) Docker Compose.
Docker Compose — инструмент для создания и запуска многоконтейнерных Docker приложений. В Compose, вы используете специальный файл для конфигурирования ваших сервисов приложения. Затем, используется простая команда, для создания и запуска всех сервисов из конфигурационного файла.
Установим (скачаем) docker-compose и сделаем его исполняемым:
Чтобы установить другую версию Compose, замените 1.28.2 версией Compose, которую вы хотите использовать.
# sudo curl -L «https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
# sudo chmod +x /usr/local/bin/docker-compose
# docker-compose —version