# How to remove all Docker Containers and Images

Source: https://www.hukot.net/community/en/tutorials/how-to-remove-all-docker-containers-and-images
Updated: 2026-11-25

#### How to stop all Docker Containers

```
docker kill $(docker ps -q)
```

#### How to remove all Docker Containers

```
docker rm $(docker ps -a -q)
```

#### How to remove all Docker Images

```
docker rmi -f $(docker images -q | sort -u)
```

Images with more than one tag are not removed without `-f` and their ID appears in the list repeatedly, hence `sort -u`.

####
