$ docker-clean images
No containers To clean!
Cleaning images...
Error: No such image or container: 178ab09fdd10
Error: No such image or container: 178ab09fdd10
Error: No such image or container: 518a026fd577


$ docker-clean --help

  Docker Clean Usage Options: 

-h or --help        Opens this help menu
-v or --version     Prints the current docker-clean version

 Running without any options will remove dangling volumes and untagged images only.
 All of the options are option, and while they overlap they can all be run concurrently.
 NOTE: By default, created containers will always be included, see -d, --created.

stop         Stops and removes all containers, cleans dangling volumes, and networks

images       Removes all tagged and untagged images, stopped containers, 
             dangling volumes, and networks

run          Removes all stopped containers, untagged images, dangling volumes, and networks

all          Stops and removes all containers, images, volumes and networks

Additional Flag options:

-H   or --host        Specifies the docker host to run against
                      Useful for docker swarm maintenance
                      ie: -H

-n   or --dry-run     Adding this additional flag will list items to be
                      removed without executing any stopping or removing commands

-s   or --stop        Stops all running containers

-c   or --containers  Removes all stopped containers

-i   or --images      Removes all untagged images

-net or --networks    Removes all empty Networks (all network cleans are only empty)

-r   or --restart     Restarts the docker machine/daemon

-d   or --created     By default, CREATED containers are set to be removed.  Adding this
                      flag will ensure that all created containers are not cleaned

-t   or --tagged      Removes all tagged images

-a   or --all         Stops and removes all Containers, Images, AND Restarts docker

-l   or --log         Adding this as an additional flag will list all
                      image, volume, and container deleting output


Docker-CleanはDocker用、MIT Licenseのオープンソース・ソフトウェアです。

ZZROTDesign/docker-clean: A script that cleans docker containers, images, volumes, and networks.



  • DevRel
  • Com2