So, you want to delete old log files in your Fedora system?
Fernando Tricas García

Fernando Tricas García @fernand0

About: El mundo es imperfecto. Puedes hacer algo para mejorarlo. O no. Puede que lo consigas. O no.

Location:
Zaragoza, Spain
Joined:
Mar 6, 2020

So, you want to delete old log files in your Fedora system?

Publish Date: Oct 2 '21
1 0

Some old hard drives

In my system the log space was getting big (more than 4Gb). Since nowadays we have these small solid state disks this can be a problem.

I checked Can I remove files in /var/log/journal and /var/cache/abrt-di/usr? and this instruction does the magic:

sudo journalctl --vacuum-size=500M

Moreover, you can activate log rotation with:

sudo systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service

and you'll need to restart the service:

sudo systemctl restart systemd-journald.service

Finally, if you want to check the size of your journaling logging space:

journalctl --disk-usage

Or, in the old-fashioned (and more 'physical') way:

du -h /var/log/journal/

No more complaints about the size of the root filesystem, for now.

Comments 0 total

    Add comment