How to vacuum journalctl

How to free up space if your Linux journal (combined log file) is taking up a lot of space

On some systems /var/log might be taking up a lot of space. Sometimes it’s the Journal. Here are some commands to assist when working with the journal:

root@cpl:/var/log# journalctl --disk-usage
Archived and active journals take up 3.1G in the file system.

Maybe the problem is elsewhere, in /var/log, so use this:

root@cpl:/# cd /var/log
root@cpl:/var/log# du -h --max-depth=1

You can vacuum the journal by size or by time. To do it by size, do this:

sudo journalctl --vacuum-size=500M

To vacuum it by time, do this:

journalctl --vacuum-time=1d

Here is an arbitrary command to see what’s happening in the journal.Yep, you can follow it:

journalctl -f

Reference

Share this article

Leave a Reply

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

Scroll to Top