---
## 🧹 What this command does
```bash
docker container rm --force $(docker container ls --all --quiet)
```
This command **removes ALL containers on your system**, including:
- running containers
- stopped containers
- exited containers
- containers created but never started
It does this **without asking for confirmation**.
Use it carefully—this is a destructive cleanup command.
---
## ⚙️ How it works (step-by-step)
### 1️⃣ `docker container ls --all --quiet`
This part lists every container _ID_:
- `--all` → include stopped containers
- `--quiet` → output **only IDs**, nothing else
Example output:
```
832f1c9a1d3e
f28bce8c92aa
b73a55f9e52d
```
### 2️⃣ `$()` command substitution
`$()` takes the output of one command and **inserts it** into another.
So the final command becomes:
```bash
docker container rm --force 832f1c9a1d3e f28bce8c92aa b73a55f9e52d
```
### 3️⃣ `docker container rm --force`
- `rm` = remove
- `--force` = kill running containers first, then remove
This ensures nothing blocks deletion.
---
## ✔ Works on:
- Linux terminal
- macOS terminal
- Windows PowerShell
PowerShell also supports `$()` substitution (unlike CMD).
---
## ⚠️ Warning
This **does not remove images** or **volumes**.
It only removes containers.
If you want to clean more deeply, let me know — I can give you:
- full cleanup (containers + images + volumes)
- safe cleanup (only unused)
- scripts for cron / Windows scheduled task
- Docker Compose safe cleanup commands
Just tell me what you want!