To check the space occupied by the journals use command:

$ journalctl –disk-usage

or

$ du -sh /var/log/journal

or

$ journalctl --vacuum-size=500M

which deletes old log-files from /var/log/journal until total size of the directory becomes under specified threshold (500 megabytes in this example).

You can also clean based on time:

$ journalctl --vacuum-time=10d

Is it possible to delete journal files manually wihout harm? Yes!

Everything inside of /var/log/journal/* could bu deleted but do not delete the directory itself.

sudo rm -rf /var/log/journal/*

You can control the size of this directory using this parameter in your /etc/systemd/journald.conf:

SystemMaxUse=50M

You can force a log rotation:

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

NOTE: You might need to restart the logging service to force a log rotation, if the above signaling method does not do it. You can restart the service like so:

$ sudo systemctl restart systemd-journald.service

Add new comment

The content of this field is kept private and will not be shown publicly.
  • No HTML tags allowed.
                      .oooooo.               oooooooooo.      .oooooo.             .o.       
d8P' `Y8b `888' `Y8b d8P' `Y8b .888.
ooo. .oo. .oo. 888 .oooo. 888 888 888 888 .8"888.
`888P"Y88bP"Y88b 888 `P )88b 888 888 888 888 .8' `888.
888 888 888 888 .oP"888 888 888 888 888 .88ooo8888.
888 888 888 `88b ooo d8( 888 888 d88' `88b d88b .8' `888.
o888o o888o o888o `Y8bood8P' `Y888""8o o888bood8P' `Y8bood8P'Ybd' o88o o8888o


Enter the code depicted in ASCII art style.