Clean linux logs

This commit is contained in:
Jan Jastrow 2024-10-20 14:13:09 +02:00
parent be0c5488a6
commit 326fae5d2d

8
scripts/clean-logs-linux.sh Executable file
View File

@ -0,0 +1,8 @@
#!/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