xxxxxxxxxx
docker container stop $(docker container ls -aq)
xxxxxxxxxx
############ removes all containers #########
docker container rm $(docker container ls -aq)
############ removes all images #############
docker image rm $(docker image ls -q)
xxxxxxxxxx
# remove containers created between now upto 4hrs back
docker container prune --filter "until=4h"
# remove images created between now upto 4hrs back
docker image prune --filter "until=4h"