Editing Docker system prune

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lc}}
 
 
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</code>
 
* <code>[[docker system]] prune</code>
* <code>[[docker system prune -a]]</code>
 
 
* <code>[[docker system]] prune -f</code> (<code>-f</code>Do not ask for confirmation)
 
* <code>[[docker system]] prune -f</code> (<code>-f</code>Do not ask for confirmation)
  
* <code>[[docker system prune --volumes]]</code>
 
* <code>docker system prune --all --volumes [[--force]]</code>
 
  
  
docker system prune
+
<code>docker system prune</code>
 
  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  
 +
<pre>
 +
docker system prune -a
 +
WARNING! This will remove:
 +
        - all stopped containers
 +
        - all networks not used by at least one container
 +
        - all images without at least one container associated to them
 +
        - all build cache
 +
Are you sure you want to continue? [y/N] y
  
 +
..../....
 +
 +
Total reclaimed space: 301MB
 +
</pre>
  
 
* <code>[[docker system prune --volumes]]</code> (Related [[Docker Volumes]]: <code>[[docker volumes prune]]</code>)
 
* <code>[[docker system prune --volumes]]</code> (Related [[Docker Volumes]]: <code>[[docker volumes prune]]</code>)
* <code>[[docker volume ls]]</code>
+
<code>[[docker volume ls]]</code>
 +
 
  
== Related ==
 
 
  [[journalctl -r -u dockerd]]
 
  [[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:
 
  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 ==
+
== Related commands ==
 
* <code>[[docker system df]]</code> or <code>[[docker system df]] --verbose</code>
 
* <code>[[docker system df]]</code> or <code>[[docker system df]] --verbose</code>
 
* <code>[[docker image prune]]</code>
 
* <code>[[docker image prune]]</code>
* <code>[[docker image rm]]</code>
 
* <code>[[docker network ls]]</code>
 
* <code>[[docker volume ls]]</code>
 
* <code>[[docker image ls]]</code>
 
* <code>[[docker network prune]]</code>
 
* <code>[[docker volume prune]]</code>
 
* <code>[[Docker is nearly out of disk space]]</code>
 
* [[Prune]]: <code>[[docker buildx prune]]</code>, [[docker buildx prune --keep-storage]]
 
  
 
== Activities ==
 
== Activities ==
Line 48: Line 47:
  
 
== See also ==
 
== See also ==
 +
* {{du}}
 
* {{docker system}}
 
* {{docker system}}
* {{du}}
+
* {{docker}}
 +
 
  
  
 
[[Category:docker]]
 
[[Category:docker]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: