Skip to content

Instantly share code, notes, and snippets.

@remylavergne
Created November 28, 2019 08:51
Show Gist options
  • Save remylavergne/c06afb3338d5206e64443b7faf332f39 to your computer and use it in GitHub Desktop.
Save remylavergne/c06afb3338d5206e64443b7faf332f39 to your computer and use it in GitHub Desktop.
[Docker] Clean Docker

Docker Cleaning

Useful commands

Sizes

$ docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              10                  1                   3.277GB             2.589GB (79%)
Containers          1                   1                   55B                 0B (0%)
Local Volumes       3                   1                   1.412GB             906.7MB (64%)
Build Cache         0                   0                   0B                  0B

Remove all unused data

docker system prune

Or specific commands :

$ docker system prune -a --volumes
$ docker image prune
$ docker container prune
$ docker volume prune
$ docker network prune

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment