How to set a maximum size limit for the journal?

Hello everyone. I want to limit the maximum size of the journal.

On Manjaro wiki there is a page called: Limit the size of .log files & the journal. In this page the instructions are to create a file called size.conf in the location /etc/systemd/journald.conf.d/size.confand then set the SystemMaxUse and SystemMaxFileSize limits inside the file.

I browsed on the /etc/systemd/ but I couldn’t find a directory named journald.conf.d.

So my question is do I have to create the directory journald.conf.d and inside it the file size.conf and then set the limits I want?

Or just edit the /etc/systemd/journald.conf and set the maximum size there as instructed on the Arch WIki systemd/Journal section?

Sorry but I can’t include links to the Manjaro or Arch Wiki sections I mentioned above.

https://wiki.manjaro.org/index.php?title=System_Maintenance#Systemd_Journal

1 Like

Yes you need to create the .d folder and the file with your values.

You could do that, but with the next update of systemd pacman will create a pacnew file for journald.conf and you would need to check it and maybe merge it.

It is usually better to create the .d folder and make changes to the default in conf files.

3 Likes

Thanks I didn’t read this section. My bad I guess :sunglasses:.

No worries … though … I woudl say @xabbu’s answer is better.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.