How to safely clean up Journalctl logs#

1. Check disk usage#

journalctl --disk-usage

2. Remove old logs#

Use the command “journalctl –vacuum-size=500M” to clear logs that are larger than 500MB. Adjust the size parameter as needed.

journalctl --vacuum-size=500M

Alternatively, you can use “journalctl –vacuum-time=2weeks” to clear logs older than two weeks.

journalctl –vacuum-time=2weeks

or remove all logs:

journalctl --rotate
journalctl --vacuum-time=1s

3. Restart service#

systemctl restart systemd-journald.service
systemctl status systemd-journald.service