As you keep creating new docker containers from images (without --rm option) you will see that you start accumulating stopped containers that take up space, you can check them by running the docker ps command with -a option.
Example:% docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e9072f3eff69 fedora "echo hello" 17 minutes ago Exited (0) 17 minutes ago thirsty_almeida
21abcc335be3 ubuntu "echo 12345" 17 minutes ago Exited (0) 17 minutes ago interesting_turing
0c0ba20b0018 fedora "echo hello" 18 minutes ago Exited (0) 18 minutes ago cool_robinson
If you do not need them and so to remove all the stopped containers we can make use of the docker container prune command,
Example:% docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
e9072f3eff695c461c505a00a8ec63037994daad1df6fd5e41ffa9c10fc26c42
21abcc335be31c6f95312a88bf22738cfe79fb735f864a5b3532f5cf439dbbe8
0c0ba20b00189a16c383d32fc61b9189beddbb6d94454ef9f5617315a95c9229
Total reclaimed space: 124B
Remove Containers based on time lasped since created using until filter
Prune all docker containers that were created 10 minutes from now using --filter option,
% docker container prune --filter "until=10m"
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
e9072f3eff695c461c505a00a8ec63037994daad1df6fd5e41ffa9c10fc26c42
Total reclaimed space: 0B

If you do not want to see the prompt as you run the prune command you can make use of the -f or --force option.
Delete a specific Stopped Docker Container
If you want to remove a specific docker container you can make use of the docker rm command followed by the container name,
% docker rm charming_antonelli
charming_antonelli
Have Questions? Post them here!
- How to docker remove a container when it exits
- Install Python on Alpine Linux - Docker
- How to Rename Docker Image with none TAG and REPOSITORY?
- Remove all stopped containers in Docker using prune command
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- [fix] Error response from daemon: conflict unable to remove repository reference ubuntu container is using its referenced image
- [Docker] Install Python3 on Alpine Linux
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- How to know the Docker Engine Version
- [fix] Docker: OCI runtime exec failed unable to start container process
- [Solution] Alpine Docker apt-get: not found
- Install and Run Cassandra on Docker Desktop
- Install node on Alpine Linux Docker
- How to Copy files from Docker Container to Host System
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- How to stop and start a docker container
- Docker - Error response from daemon: You cannot remove a running container
- Open Docker Desktop from macOS Terminal
- How to check installed docker version command
- How to know the Docker Sandbox ID of a Container Network?
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- [Docker] Install Git on Alpine Linux
- Docker MySQL Compose File with Volume Example
- [fix] Docker: Alpine Linux - /bin/sh: bash: not found
- The selected device is incompatible : Android Studio - Android-Studio
- How to Disable EditText Keyboard Android App - Android
- align image at middle of div element - CSS
- How to Select All text in vim/vi editor using Keyboard - Linux
- Docker Desktop needs privileged access macOS - MacOS
- Formatting Double in Java [Examples] - Java
- How to Install glib on Mac - MacOS
- Get Browser Screen Width and Height dynamically using jQuery - jQuery