Skip to content

Instantly share code, notes, and snippets.

@phanlyhuynh
Last active December 1, 2023 01:48
Show Gist options
  • Save phanlyhuynh/c78d1d4d7c0384e42ff3558b204a84fe to your computer and use it in GitHub Desktop.
Save phanlyhuynh/c78d1d4d7c0384e42ff3558b204a84fe to your computer and use it in GitHub Desktop.
How To Clean Up Docker Overlay2?
Firstly, we have to check the disk usage by Docker using the following command:
docker system df
Docker does not by default remove the images even if they are not in use. To remove unused photos, we can use the below command:
docker image prune --all
In order to clean up unused containers and images, we can use the docker system prune.
docker system prune --all
Remove build cache
docker builder prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment