github.com/olljanat/moby@v1.13.1/docs/reference/commandline/image_prune.md (about)

     1  ---
     2  title: "image prune"
     3  description: "Remove all stopped images"
     4  keywords: "image, prune, delete, remove"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # image prune
    17  
    18  ```markdown
    19  Usage:	docker image prune [OPTIONS]
    20  
    21  Remove unused images
    22  
    23  Options:
    24    -a, --all     Remove all unused images, not just dangling ones
    25    -f, --force   Do not prompt for confirmation
    26        --help    Print usage
    27  ```
    28  
    29  Remove all dangling images. If `-a` is specified, will also remove all images not referenced by any container.
    30  
    31  Example output:
    32  
    33  ```bash
    34  $ docker image prune -a
    35  WARNING! This will remove all images without at least one container associated to them.
    36  Are you sure you want to continue? [y/N] y
    37  Deleted Images:
    38  untagged: alpine:latest
    39  untagged: alpine@sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
    40  deleted: sha256:4e38e38c8ce0b8d9041a9c4fefe786631d1416225e13b0bfe8cfa2321aec4bba
    41  deleted: sha256:4fe15f8d0ae69e169824f25f1d4da3015a48feeeeebb265cd2e328e15c6a869f
    42  untagged: alpine:3.3
    43  untagged: alpine@sha256:4fa633f4feff6a8f02acfc7424efd5cb3e76686ed3218abf4ca0fa4a2a358423
    44  untagged: my-jq:latest
    45  deleted: sha256:ae67841be6d008a374eff7c2a974cde3934ffe9536a7dc7ce589585eddd83aff
    46  deleted: sha256:34f6f1261650bc341eb122313372adc4512b4fceddc2a7ecbb84f0958ce5ad65
    47  deleted: sha256:cf4194e8d8db1cb2d117df33f2c75c0369c3a26d96725efb978cc69e046b87e7
    48  untagged: my-curl:latest
    49  deleted: sha256:b2789dd875bf427de7f9f6ae001940073b3201409b14aba7e5db71f408b8569e
    50  deleted: sha256:96daac0cb203226438989926fc34dd024f365a9a8616b93e168d303cfe4cb5e9
    51  deleted: sha256:5cbd97a14241c9cd83250d6b6fc0649833c4a3e84099b968dd4ba403e609945e
    52  deleted: sha256:a0971c4015c1e898c60bf95781c6730a05b5d8a2ae6827f53837e6c9d38efdec
    53  deleted: sha256:d8359ca3b681cc5396a4e790088441673ed3ce90ebc04de388bfcd31a0716b06
    54  deleted: sha256:83fc9ba8fb70e1da31dfcc3c88d093831dbd4be38b34af998df37e8ac538260c
    55  deleted: sha256:ae7041a4cc625a9c8e6955452f7afe602b401f662671cea3613f08f3d9343b35
    56  deleted: sha256:35e0f43a37755b832f0bbea91a2360b025ee351d7309dae0d9737bc96b6d0809
    57  deleted: sha256:0af941dd29f00e4510195dd00b19671bc591e29d1495630e7e0f7c44c1e6a8c0
    58  deleted: sha256:9fc896fc2013da84f84e45b3096053eb084417b42e6b35ea0cce5a3529705eac
    59  deleted: sha256:47cf20d8c26c46fff71be614d9f54997edacfe8d46d51769706e5aba94b16f2b
    60  deleted: sha256:2c675ee9ed53425e31a13e3390bf3f539bf8637000e4bcfbb85ee03ef4d910a1
    61  
    62  Total reclaimed space: 16.43 MB
    63  ```
    64  
    65  ## Related information
    66  
    67  * [system df](system_df.md)
    68  * [container prune](container_prune.md)
    69  * [volume prune](volume_prune.md)
    70  * [network prune](network_prune.md)
    71  * [system prune](system_prune.md)