.dotfiles/scripts/clean-logs-linux.sh

9 lines
163 B
Bash
Raw Normal View History

2024-10-20 14:13:09 +02:00
#!/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