Skip to content

Instantly share code, notes, and snippets.

@jwhb
Created February 3, 2024 11:15
Show Gist options
  • Select an option

  • Save jwhb/068c4786deaaac16edc3e32992159ba8 to your computer and use it in GitHub Desktop.

Select an option

Save jwhb/068c4786deaaac16edc3e32992159ba8 to your computer and use it in GitHub Desktop.
Sort Docker volumes by size
#!/bin/sh
docker system df -v --format json | jq -r '.Volumes[] | [.Size,.Name] | @tsv' | sort -h
@jwhb
Copy link
Author

jwhb commented Sep 30, 2025

This should work with Podman 5.4.0 or newer:

podman system df -v | sed -e '1,/^VOLUME NAME.*$/d' | sort -hk3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment