Clear systemd journal

Journalctl is a utility for querying and displaying logs from journald, systemd’s logging service.

Journal logs can take considerable amount of disk space.

Here are some useful steps to free up space on ubuntu and in Linux in general.

Check how much disk space is currently taken up by the journal
$ journalctl --disk-usage
Clear systemd journals older than X days
$ journalctl --vacuum-time=5d
Clear systemd journals if they exceed X storage
$ journalctl --vacuum-size=1G

Leave a Comment

Your email address will not be published. Required fields are marked *