Docker cleanup - free disk space (prune) | Drupal 8

Docker cleanup - free disk space (prune)

Submitted by editor on Mon, 05/25/2020 - 10:35
Question

How to cleanup docker images, containers, volumes ... ?

Remove all everything not used by at least one container - Prune everything

docker system prune

Note : If you are on Docker 17.06.1 or higher and want to also prune volumes, add the --volumes flag:
docker system prune --volumes

 

Remove all dangling images

docker image prune

Remove all stopped containers

docker container prune

Remove all volumes not used by at least one container

docker volume prune

Remove all networks not used by at least one container

docker network prune

Tags

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.