github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/docs/reference/commandline/system_prune.md (about) 1 --- 2 title: "system prune" 3 description: "Remove unused data" 4 keywords: "system, prune, delete, remove" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # system prune 17 18 ```markdown 19 Usage: docker system prune [OPTIONS] 20 21 Delete unused data 22 23 Options: 24 -a, --all Remove all unused images not just dangling ones 25 --filter filter Provide filter values (e.g. 'until=<timestamp>') 26 -f, --force Do not prompt for confirmation 27 --help Print usage 28 ``` 29 30 Remove all unused containers, volumes, networks and images (both dangling and unreferenced). 31 32 Example output: 33 34 ```bash 35 $ docker system prune -a 36 WARNING! This will remove: 37 - all stopped containers 38 - all volumes not used by at least one container 39 - all networks not used by at least one container 40 - all images without at least one container associated to them 41 Are you sure you want to continue? [y/N] y 42 Deleted Containers: 43 0998aa37185a1a7036b0e12cf1ac1b6442dcfa30a5c9650a42ed5010046f195b 44 73958bfb884fa81fa4cc6baf61055667e940ea2357b4036acbbe25a60f442a4d 45 46 Deleted Volumes: 47 named-vol 48 49 Deleted Images: 50 untagged: my-curl:latest 51 deleted: sha256:7d88582121f2a29031d92017754d62a0d1a215c97e8f0106c586546e7404447d 52 deleted: sha256:dd14a93d83593d4024152f85d7c63f76aaa4e73e228377ba1d130ef5149f4d8b 53 untagged: alpine:3.3 54 deleted: sha256:695f3d04125db3266d4ab7bbb3c6b23aa4293923e762aa2562c54f49a28f009f 55 untagged: alpine:latest 56 deleted: sha256:ee4603260daafe1a8c2f3b78fd760922918ab2441cbb2853ed5c439e59c52f96 57 deleted: sha256:9007f5987db353ec398a223bc5a135c5a9601798ba20a1abba537ea2f8ac765f 58 deleted: sha256:71fa90c8f04769c9721459d5aa0936db640b92c8c91c9b589b54abd412d120ab 59 deleted: sha256:bb1c3357b3c30ece26e6604aea7d2ec0ace4166ff34c3616701279c22444c0f3 60 untagged: my-jq:latest 61 deleted: sha256:6e66d724542af9bc4c4abf4a909791d7260b6d0110d8e220708b09e4ee1322e1 62 deleted: sha256:07b3fa89d4b17009eb3988dfc592c7d30ab3ba52d2007832dffcf6d40e3eda7f 63 deleted: sha256:3a88a5c81eb5c283e72db2dbc6d65cbfd8e80b6c89bb6e714cfaaa0eed99c548 64 65 Total reclaimed space: 13.5 MB 66 ``` 67 68 ## Filtering 69 70 The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more 71 than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) 72 73 The currently supported filters are: 74 75 * until (`<timestamp>`) - only remove containers, images, and networks created before given timestamp 76 77 The `until` filter can be Unix timestamps, date formatted 78 timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed 79 relative to the daemon machine’s time. Supported formats for date 80 formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, 81 `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local 82 timezone on the daemon will be used if you do not provide either a `Z` or a 83 `+-00:00` timezone offset at the end of the timestamp. When providing Unix 84 timestamps enter seconds[.nanoseconds], where seconds is the number of seconds 85 that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap 86 seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a 87 fraction of a second no more than nine digits long. 88 89 ## Related information 90 91 * [volume create](volume_create.md) 92 * [volume ls](volume_ls.md) 93 * [volume inspect](volume_inspect.md) 94 * [volume rm](volume_rm.md) 95 * [volume prune](volume_prune.md) 96 * [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) 97 * [system df](system_df.md) 98 * [container prune](container_prune.md) 99 * [image prune](image_prune.md) 100 * [network prune](network_prune.md) 101 * [system prune](system_prune.md)