codegurukool.com · Free coding tutorials & online compiler

Home › Docker Tutorial › Clean up

Clean up

Free disk space.

Stopped containers, unused images and old volumes pile up. docker system prune removes stopped containers, unused networks and dangling images. Add -a to remove all unused images and --volumes to remove unused volumes (careful: that deletes data). -f skips the confirmation question.

Example code

docker system prune -f

Run this code in the online editor

← TroubleshootingLive project: Containerize a website →