.dotfiles/scripts/clean-logs-linux.sh
2024-10-20 14:13:09 +02:00

9 lines
163 B
Bash
Executable File

#!/usr/bin/env bash
set -uo pipefail
# Delete logs older than 7 days
sudo journalctl --vacuum-time=7days
# Delete other archived log files
sudo rm /var/log/*.gz