You can delete all Docker containers by using the following command:
```
docker rm $(docker ps -a -q)
```
Let me explain this command:
- `docker ps -a -q` : This command will return all IDs for every container in Docker.
- `docker rm` : This command will remove Docker containers.
- `$(docker ps -a -q)` : This is command substitution in bash. It will replace `$(docker ps -a -q)` with the output of `docker ps -a -q` which are all the container IDs.
- So, in the end `docker rm` will delete all Docker containers.
Just keep in mind, this will delete both running and stopped containers. It’s necessary to stop all running containers before attempting this. You can stop all containers with command:
\`\`\`bash
docker stop $(docker ps -a -q)
\`\`\`
Substituting `$(docker ps -a -q)` with container IDs will result in command like `docker stop containerID1 containerID2 …`. It’ll stop every container one by one. After running this command to stop all containers, you can safely run the command to delete all containers.