Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 551 Bytes

File metadata and controls

33 lines (21 loc) · 551 Bytes

Clear Journald Logs

Journalctl can accumulate a lot of system logs over time being, we can clear the logs using --vacuum-time or --vacuum-size argument.

Clear Logs by Time

Only retain last 3 days of logs:

journalctl --vacuum-time=3d

Clear Logs by Size

Only retain 1 GB of logs:

journalctl --vacuum-size=1G

Set Max Log Size

You can configure the max log size in /etc/systemd/journald.conf:

SystemMaxUse=1G

Then restart the journald service:

systemctl restart systemd-journald