Skip to content

Instantly share code, notes, and snippets.

@ayozehd
Created September 20, 2020 11:23
Show Gist options
  • Save ayozehd/1286eeb0181cbbd382af5bdc0ac70d1c to your computer and use it in GitHub Desktop.
Save ayozehd/1286eeb0181cbbd382af5bdc0ac70d1c to your computer and use it in GitHub Desktop.
Clean all docker containers logs
#!/bin/bash
# Run this script as ROOT
# Display docker logs disk usage in human-readable
du -chs /var/lib/docker/containers/*/*json.log;
# Clean all docker logs
truncate -s 0 /var/lib/docker/containers/*/*-json.log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment