Difference between revisions of "Docker image prune"

From wikieduonline
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}}
* {{docker}}
 
  
 
[[Category:Docker]]
 
[[Category:Docker]]

Latest revision as of 08:57, 7 April 2023

Advertising: