I've never tried setting it but maybe setting MaxRetentionSec in
/etc/systemd/journald.conf?
https://oneuptime.com/blog/post/2026-03-04-configure-journald-persistent-storage-log-rotation-rhel-9/view
seems quite informative
On 01/09/2026 21:10, Peter Merchant wrote:
I have the following as a reminder in my calendar,
sudo journalctl --vacuum-time=2d
clears old log files and frees space. Need to find out how to put this
into monthly crontab
Peter
On 31/08/2026 16:08, Ian Morris via dorset wrote:
I believe bookwork did away with these syslog style logs in favour of
systemd journald ... so you might even remove a lot of those log
files entirely.
(http://web.archive.org/web/20240120203515/https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#changes-to-system-logging)
That said, I've observed journald takes quite a lot more space by
default that syslog ever did....
On 31/08/2026 14:02, Ralph Corderoy wrote:
Hi Tim H,
When the log files gets to a certain size or a pre-determine time
(weekly, monthly etc) the system will compress them for archiving
hence the .gz files.
This is done by the logrotate program.
Its configuration comes from the /etc/logrotate.conf file,
and the files in the /etc/logrotate.d directory.
Altering its configuration to keep fewer log files, or ones which go
back less time, would have it remove the older ones when it's next
automatically run. And keep on removing them.
For example, my /etc/logrotate.conf includes:
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
But unless ‘sudo du -sh /var/log’ suggests /var/log is a particular
disk hog, then Clive will probably achieve enough space savings with
his
kernel clean-up. And that's something which will grow forever
otherwise.
--
Next meeting: Online, Jitsi, Tuesday, 2026-09-01 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]