How to remove docker containers and images (Easy Method)

To remove all Docker images from your system, you can use the following command:

docker rmi $(docker images -q)

To remove all Docker containersFirst, stop all running containers:

docker stop $(docker ps -aq)

Then, remove all containers:

docker rm $(docker ps -aq)
Updated on