Difference between revisions of "Docker image prune"
Jump to navigation
Jump to search
(31 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <code>docker image prune</code> https://docs.docker.com/engine/reference/commandline/image_prune/ | + | {{lc}} |
+ | <code>[[docker image]] [[prune]]</code> remove unused [[Docker images|images]]. https://docs.docker.com/engine/reference/commandline/image_prune/ | ||
+ | Options: | ||
+ | -a, --all not just the [[dangling]] ones | ||
+ | -f, --force | ||
+ | [[--filter]] | ||
+ | ❗ Attention: [[inappropriate]] usage from this command may cause [[data loss]]. | ||
+ | == Examples == | ||
+ | Remove [[dangling]] images, to filter them: <code>[[docker images --filter]] "dangling=true"</code> | ||
+ | * <code>[[docker image]] prune</code> | ||
+ | Remove all unused images: | ||
+ | * <code>[[docker image prune -a]]</code> | ||
+ | * <code>[[docker image prune -a]] -f</code> | ||
== Related commands == | == Related commands == | ||
+ | * <code>[[docker image ls]]</code> | ||
+ | * <code>[[docker image rm]]</code> | ||
* <code>[[docker system df]]</code> | * <code>[[docker system df]]</code> | ||
* <code>[[docker system prune]]</code> | * <code>[[docker system prune]]</code> | ||
* <code>[[docker container prune]]</code> | * <code>[[docker container prune]]</code> | ||
+ | * <code>[[docker image tag]]</code> | ||
+ | * <code>[[podman image prune]]</code> | ||
+ | * <code>[[docker images]] [[--filter]] "[[dangling]]=true"</code> | ||
== See also == | == See also == | ||
+ | * {{docker image}} | ||
* {{docker images management}} | * {{docker images management}} | ||
− | |||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 08:57, 7 April 2023
docker image prune
remove unused images. https://docs.docker.com/engine/reference/commandline/image_prune/
Options: -a, --all not just the dangling ones -f, --force --filter
❗ Attention: inappropriate usage from this command may cause data loss.
Examples[edit]
Remove dangling images, to filter them: docker images --filter "dangling=true"
docker image prune
Remove all unused images:
Related commands[edit]
docker image ls
docker image rm
docker system df
docker system prune
docker container prune
docker image tag
podman image prune
docker images --filter "dangling=true"
See also[edit]
docker image
: [push | ls | rm | prune | inspect | tag | --help
]- Docker images management:
docker images
,docker image
,docker image inspect
Advertising: