Difference between revisions of "Docker system prune"

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
https://docs.docker.com/engine/reference/commandline/system_prune/. Since API 1.25+ (v 1.13) 01/2017 [https://www.docker.com/blog/whats-new-in-docker-1-13/ announcement]  
 
https://docs.docker.com/engine/reference/commandline/system_prune/. Since API 1.25+ (v 1.13) 01/2017 [https://www.docker.com/blog/whats-new-in-docker-1-13/ announcement]  
  
 +
Use carefully, your stopped containers will be deleted.
  
Use carefully, your stopped containers will be deleted.
+
== Example ==
 
* <code>[[docker system prune --help]]</code>
 
* <code>[[docker system prune --help]]</code>
 
* <code>[[docker system]] prune</code>
 
* <code>[[docker system]] prune</code>
Line 10: Line 11:
  
 
* <code>[[docker system prune --volumes]]</code>
 
* <code>[[docker system prune --volumes]]</code>
* <code>docker system prune --all --volumes --force</code>
+
* <code>docker system prune --all --volumes [[--force]]</code>
  
  
<code>docker system prune</code>
+
docker system prune
 
  WARNING! This will remove:
 
  WARNING! This will remove:
 
   - all stopped containers
 
   - all stopped containers
 
   - all networks not used by at least one container
 
   - all networks not used by at least one container
   - all dangling images
+
   - all [[dangling]] images
 
   - all dangling [[build cache]]
 
   - all dangling [[build cache]]
  
<code>docker system prune -a</code> Remove all unused images not just [[dangling]] (untagged) ones  
+
* <code>docker system prune -a</code> Remove all unused images not just [[dangling]] (untagged) ones  
  
  
Line 41: Line 42:
 
* <code>[[docker volume prune]]</code>
 
* <code>[[docker volume prune]]</code>
 
* <code>[[Docker is nearly out of disk space]]</code>
 
* <code>[[Docker is nearly out of disk space]]</code>
 +
* [[Prune]]: <code>[[docker buildx prune]]</code>, [[docker buildx prune --keep-storage]]
  
 
== Activities ==
 
== Activities ==
Line 46: Line 48:
  
 
== See also ==
 
== See also ==
 +
* {{docker system}}
 
* {{du}}
 
* {{du}}
* {{docker system}}
 
* {{docker}}
 
 
  
  
 
[[Category:docker]]
 
[[Category:docker]]

Latest revision as of 10:21, 14 September 2023

https://docs.docker.com/engine/reference/commandline/system_prune/. Since API 1.25+ (v 1.13) 01/2017 announcement

Use carefully, your stopped containers will be deleted.

Example[edit]


docker system prune
WARNING! This will remove:
 - all stopped containers
 - all networks not used by at least one container
 - all dangling images
 - all dangling build cache
  • docker system prune -a Remove all unused images not just dangling (untagged) ones


Related[edit]

journalctl -r -u dockerd
Sep 15 15:49:41 SERVER_NAME dockerd[1015]: time="2020-09-15T15:49:41.387495853+04:00" level=warning msg="failed to prune image docker.io .../... No such image:


Related[edit]

Activities[edit]

See also[edit]

  • https://docs.docker.com/v17.12/edge/engine/reference/commandline/system_info/
  • https://docs.docker.com/v17.12/edge/engine/reference/commandline/system_events/
  • Advertising: