Avatar

How to truncate docker logs

To truncate docker logs to clear up disk space use the truncate command.

truncate -s 0 /path/<file>.log

To truncate all docker logs, run the following.

truncate -s 0  /var/lib/docker/containers/*/*-json.log