Jump to content


Managing Systemd journal files


  • Please log in to reply
1 reply to this topic

#1 OFFLINE   sunrat

sunrat

    Thread Kahuna

  • Forum Moderators
  • 5,743 posts

Posted 22 November 2018 - 08:48 AM

I just did a full upgrade and noticed my disk space was getting over 80% so time for spring cleaning. Did the usual apt clean, remove kernels and clear superfluous downloads, but on running Filelight I noticed /var/log/journal/ was about 1.2GB. I'm pretty sure I won't need to look up journal entries from months (or a year) ago or even days, so looked into ways to reduce the stored journal files.
The recommended way is to use journalctl and you can choose what or how much to remove:
journalctl --vacuum-size=50M  #delete files until the disk space they use falls below the specified size
journalctl --vacuum-time=1years	#delete files so that all journal files contain no data older than the specified timespan
journalctl --vacuum-files=4	 #delete files so that no more than the specified number of separate journal files remain in storage location

Need to be run as root or sudo.

Thanks to https://www.tecmint....ing-journalctl/ and well worth a read for stacks of other things you can do with the systemd journal.
registered Linux user number 324659  ||    The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted ImagePosted Image
For the things we have to learn before we can do them, we learn by doing them.

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 24,130 posts

Posted 22 November 2018 - 12:33 PM

Nice, I'll have to check that out after I get back from the holiday. Thanks :thumbsup:
Posted ImagePosted Image
Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users