Difference between revisions of "Docker system prune"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 7: Line 7:
 
* <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</code>
 +
WARNING! This will remove:
 +
  - all stopped containers
 +
  - all networks not used by at least one container
 +
  - all dangling images
 +
  - 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  

Revision as of 09:13, 26 April 2020

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.


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

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


Related commands

Activities

See also

  • 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: