Last active
August 14, 2025 08:23
-
-
Save devasheeshG/7ac34ca264c9712469dac9e6a555149b to your computer and use it in GitHub Desktop.
Delete logs of all docker containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c 'du -sh /var/lib/docker/containers/*/*-json.log 2>/dev/null' && sudo sh -c 'truncate -s 0 /var/lib/docker/containers/*/*-json.log 2>/dev/null' && echo "Docker logs cleared successfully" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment