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:

[email protected]:/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:

[email protected]:/# cd /var/log
[email protected]:/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

https://unix.stackexchange.com/questions/130786/can-i-remove-files-in-var-log-journal-and-var-cache-abrt-di-usr

Share this article

Leave a Reply

Your email address will not be published.

Scroll to Top