Remove unused Docker data
high risk
docker system dfCheck usage firstdocker image pruneDangling images onlydocker container pruneStopped containers onlyCleans up disk space used by Docker. See the flags and examples below, and run `man docker` for the full reference.
| Flag | Meaning |
|---|---|
-a | Remove all unused images⚠ Forces re-pulls. |
--volumes --volumes | Also prune volumes⚠ Deletes data in unused volumes. |
-f | Do not ask |
docker system dfSee what uses space · explain & risk-check →docker system pruneRemove dangling data · explain & risk-check →Reference text is hand-written and may be incomplete — check man docker for your version. Test destructive commands on a non-production system first.