Skip to content

Instantly share code, notes, and snippets.

@timilsinabishal
Created January 22, 2017 14:43
Show Gist options
  • Save timilsinabishal/b0a2161e7d6f146bd34022022ed2ab07 to your computer and use it in GitHub Desktop.
Save timilsinabishal/b0a2161e7d6f146bd34022022ed2ab07 to your computer and use it in GitHub Desktop.
Script to reclaim the disk by removing unused docker data
#!bin/bash
#clean containers
docker rm $(docker ps -a -f status=exited -q)
#clean dangling images
docker rmi $(docker images -f dangling=true -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment