github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/docs/reference/commandline/system_df.md (about) 1 --- 2 title: "system df" 3 description: "The system df command description and usage" 4 keywords: "system, data, usage, disk" 5 --- 6 7 <!-- This file is maintained within the docker/cli GitHub 8 repository at https://github.com/docker/cli/. 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 df 17 18 ```markdown 19 Usage: docker system df [OPTIONS] 20 21 Show docker filesystem usage 22 23 Options: 24 --format string Pretty-print images using a Go template 25 --help Print usage 26 -v, --verbose Show detailed information on space usage 27 ``` 28 29 ## Description 30 31 The `docker system df` command displays information regarding the 32 amount of disk space used by the docker daemon. 33 34 ## Examples 35 36 By default the command will just show a summary of the data used: 37 38 ```bash 39 $ docker system df 40 41 TYPE TOTAL ACTIVE SIZE RECLAIMABLE 42 Images 5 2 16.43 MB 11.63 MB (70%) 43 Containers 2 0 212 B 212 B (100%) 44 Local Volumes 2 1 36 B 0 B (0%) 45 ``` 46 47 A more detailed view can be requested using the `-v, --verbose` flag: 48 49 ```bash 50 $ docker system df -v 51 52 Images space usage: 53 54 REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS 55 my-curl latest b2789dd875bf 6 minutes ago 11 MB 11 MB 5 B 0 56 my-jq latest ae67841be6d0 6 minutes ago 9.623 MB 8.991 MB 632.1 kB 0 57 <none> <none> a0971c4015c1 6 minutes ago 11 MB 11 MB 0 B 0 58 alpine latest 4e38e38c8ce0 9 weeks ago 4.799 MB 0 B 4.799 MB 1 59 alpine 3.3 47cf20d8c26c 9 weeks ago 4.797 MB 4.797 MB 0 B 1 60 61 Containers space usage: 62 63 CONTAINER ID IMAGE COMMAND LOCAL VOLUMES SIZE CREATED STATUS NAMES 64 4a7f7eebae0f alpine:latest "sh" 1 0 B 16 minutes ago Exited (0) 5 minutes ago hopeful_yalow 65 f98f9c2aa1ea alpine:3.3 "sh" 1 212 B 16 minutes ago Exited (0) 48 seconds ago anon-vol 66 67 Local Volumes space usage: 68 69 NAME LINKS SIZE 70 07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e 2 36 B 71 my-named-vol 0 0 B 72 ``` 73 74 * `SHARED SIZE` is the amount of space that an image shares with another one (i.e. their common data) 75 * `UNIQUE SIZE` is the amount of space that is only used by a given image 76 * `SIZE` is the virtual size of the image, it is the sum of `SHARED SIZE` and `UNIQUE SIZE` 77 78 > **Note**: Network information is not shown because it doesn't consume the disk 79 > space. 80 81 ## Performance 82 83 The `system df` command can be very resource-intensive. It traverses the 84 filesystem of every image, container, and volume in the system. You should be 85 careful running this command in systems with lots of images, containers, or 86 volumes or in systems where some images, containers, or volumes have very large 87 filesystems with many files. You should also be careful not to run this command 88 in systems where performance is critical. 89 90 ## Format the output 91 92 The formatting option (`--format`) pretty prints the disk usage output 93 using a Go template. 94 95 Valid placeholders for the Go template are listed below: 96 97 | Placeholder | Description | 98 | -------------- | ------------------------------------------ | 99 | `.Type` | `Images`, `Containers` and `Local Volumes` | 100 | `.TotalCount` | Total number of items | 101 | `.Active` | Number of active items | 102 | `.Size` | Available size | 103 | `.Reclaimable` | Reclaimable size | 104 105 When using the `--format` option, the `system df` command outputs 106 the data exactly as the template declares or, when using the 107 `table` directive, will include column headers as well. 108 109 The following example uses a template without headers and outputs the 110 `Type` and `TotalCount` entries separated by a colon: 111 112 ```bash 113 $ docker system df --format "{{.Type}}: {{.TotalCount}}" 114 115 Images: 2 116 Containers: 4 117 Local Volumes: 1 118 ``` 119 120 To list the disk usage with size and reclaimable size in a table format you 121 can use: 122 123 ```bash 124 $ docker system df --format "table {{.Type}}\t{{.Size}}\t{{.Reclaimable}}" 125 126 TYPE SIZE RECLAIMABLE 127 Images 2.547 GB 2.342 GB (91%) 128 Containers 0 B 0 B 129 Local Volumes 150.3 MB 150.3 MB (100%) 130 <Paste> 131 ``` 132 133 **Note** the format option is meaningless when verbose is true. 134 135 ## Related commands 136 * [system prune](system_prune.md) 137 * [container prune](container_prune.md) 138 * [volume prune](volume_prune.md) 139 * [image prune](image_prune.md) 140 * [network prune](network_prune.md)