Docker
Prune a stale Docker image cache
Reclaim disk space from dangling images and build cache without touching running containers.
Dangling images only
Safe to run at any time — this only removes images with no tag, which are almost always leftover build layers:
docker image pruneEverything not in use by a running container
More aggressive: also removes tagged images that no container currently uses.
docker system prune -aJust the build cache
docker builder prune --filter until=168huntil takes a duration — 168h prunes build cache older than a week.