# Uninstalling

This is a recipe to permanently remove HEAVY.AI Software, services, and data from your system.

### Uninstalling HEAVY.AI from Docker

To uninstall HEAVY.AI in Docker, stop and delete the current Docker container.

In a terminal window, get the Docker container ID:

```bash
sudo docker container ps --format "{{.Id}} {{.Image}}" \
-f status=running | grep heavyai\/
```

You should see an output similar to the following. The first entry is the container ID. In this example, it is `9e01e520c30c`:

```bash
9e01e520c30c omnisci/omnisci-ee-gpu
```

{% hint style="info" %}
To see all containers, both running and stopped, use the following command:

```bash
sudo docker container ps -a
```

{% endhint %}

Stop the HEAVY.AI Docker container. For example:

```bash
sudo docker container stop 9e01e520c30c
```

Remove the HEAVY.AI Docker container to save disk space. For example:

```bash
sudo docker container rm 9e01e520c30c
```

### **Uninstalling** HEAVY.AI **on Redhat and Ubuntu**

To uninstall an existing system installed with Yum, Apt, or Tarball connect using the user that runs the platform, typically `heavyai.`

Disable and stop all HEAVY.AI services.

```bash
sudo systemctl disable heavy_web_server --now
sudo systemctl disable heavydb --now
```

Remove the HEAVY.AI Installation files. (the $HEAVYAI\_PATH defaults to `/opt/heavyai`)

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

```bash
sudo yum remove heavyai.x86_64
```

{% endtab %}

{% tab title="APT" %}

```bash
sudo apt remove heavyai
```

{% endtab %}

{% tab title="Tarball" %}

```bash
sudo rm -r $(readlink $HEAVYAI_PATH) $HEAVYAI_PATH
```

{% endtab %}
{% endtabs %}

Delete the configuration files and the storage removing the $HEAVYAI\_BASE directory. (defaults to `/var/lib/heavyai`)

```bash
sudo rm  -r $HEAVYAI_BASE
```

Remove permanently the configuration of the services.

```bash
sudo rm /lib/systemd/heavydb*.service
sudo rm /lib/systemd/heavy_web_server*.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
```
