# Uninstall CMA

To uninstall CMA follow these steps:

## 1. Uninstall dependencies

### Linux

{% tabs %}
{% tab title="Ubuntu" %}

```bash
apt-get remove \
    libcurl4-openssl-dev \
    libonig-dev \
    libjpeg-dev \
    libjpeg8-dev \
    libjpeg-turbo8-dev \
    libpng-dev \
    libicu-dev \
    libfreetype6-dev \
    libzip-dev \
    libssl-dev \
    build-essential \
    libbz2-dev \
    libreadline-dev \
    libsqlite3-dev \
    libssl-dev \
    libxml2-dev \
    libxslt1-dev \
    libonig-dev \
    php-cli \
    php-bz2 \
    pkg-config \
    autoconf \
    libsodium-dev \
    cmake
```

{% endtab %}

{% tab title="Linux Mint" %}

```bash
apt-get remove \
    libjpeg-dev \
    libjpeg8-dev \
    libjpeg-turbo8-dev \
    libpng-dev \
    libicu-dev \
    libfreetype6-dev \
    libzip-dev \
    libssl-dev \
    build-essential \
    libbz2-dev \
    libreadline-dev \
    libsqlite3-dev \
    libssl-dev \
    libxml2-dev \
    libxslt1-dev \
    libonig-dev \
    php-cli \
    php-bz2 \
    pkg-config \
    autoconf \
    libcurl4-openssl-dev \
    libsodium-dev \
    cmake
```

{% endtab %}

{% tab title="CentOS" %}

```
yum autoremove --enablerepo=PowerTools \
    openssl-devel \
    libjpeg-turbo-devel \
    libpng-devel \
    gd-devel \
    libicu \
    libicu-devel \
    libzip-devel \
    libtool-ltdl-devel \
    oniguruma-devel \
    libsodium \
    libsodium-devel
```

{% endtab %}

{% tab title="Fedora" %}

```
yum autoremove openssl-devel \
    libjpeg-turbo-devel \
    libpng-devel \
    gd-devel \
    libicu \
    libicu-devel \
    libzip-devel \
    libtool-ltdl-devel \
    oniguruma-devel \
    libsodium \
    libsodium-devel
```

{% endtab %}

{% tab title="Arch Linux" %}

```
pacman -R freetype2 \
    openssl \
    oniguruma \
    libxslt \
    bzip2 \
    libjpeg-turbo \
    libpng \
    icu \
    libxml2 \
    autoconf \
    libzip \
    sqlite \
    readline \
    perl \
    libsodium
```

{% endtab %}
{% endtabs %}

### Mac

```
brew remove zlib \
    bzip2 \
    libiconv \
    curl \
    libpng \
    gd \
    freetype \
    oniguruma \
    icu4c \
    libzip \
    libxml2 \
    libsodium
```

## 2. Remove PHPBrew

```bash
rm /usr/local/bin/phpbrew

rm -rf ~/.phpbrew
```

## 3. Uninstall Docker

On Mac, follow [these instructions](https://docs.docker.com/desktop/mac/install/#uninstall-docker-desktop) to remove Docker from your system.

On Windows, follow [these instructions](https://docs.docker.com/desktop/windows/install/#uninstall-docker-desktop) to remove Docker from your system.

On Linux, follow the following instructions for your distro:

{% tabs %}
{% tab title="Ubuntu" %}
1\. Uninstall the Docker Engine, CLI, and ContainerD packages:

```bash
sudo apt-get purge docker-ce docker-ce-cli containerd.io
```

2\. Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:

```bash
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
```

Documentation is available [here](https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine).
{% endtab %}

{% tab title="Arch Linux" %}
To uninstall the Docker package:

```bash
sudo pacman -R docker
```

To uninstall the Docker package and dependencies that are no longer needed:

```bash
sudo pacman -Rns docker
```

The above commands will not remove images, containers, volumes, or user-created configuration files on your host. If you wish to delete all images, containers, and volumes run the following command:

```bash
rm -rf /var/lib/docker
```

Documentation is available [here](https://github.com/saturnism/docker/blob/master/docs/installation/archlinux.md#uninstallation).
{% endtab %}

{% tab title="CentOS" %}
1\. Uninstall the Docker Engine, CLI, and ContainerD packages:

```bash
sudo yum remove docker-ce docker-ce-cli containerd.io
```

2\. Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:

```bash
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
```

Documentation is available [here](https://docs.docker.com/engine/install/centos/#uninstall-docker-engine).
{% endtab %}

{% tab title="Fedora" %}
1\. Uninstall the Docker Engine, CLI, and ContainerD packages:

```bash
sudo yum remove docker-ce docker-ce-cli containerd.io
```

2\. Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:

```bash
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
```

Documentation is available [here](https://docs.docker.com/engine/install/fedora/#uninstall-docker-engine).
{% endtab %}
{% endtabs %}

## 4. Delete Composer cache

This might save quite a lot of space.

```
rm -rf ~/.cache/composer
```
