DEV Community

Fernando Tricas García
Fernando Tricas García

Posted on

1

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

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay