• Pacmanlives@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    Actually something I never dug into. But does logrotate no longer work? I have a bunch of disk space these days so I would not notice large log files

    • MorethanevilA
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 months ago

      If logrotate doesn’t work, than use this as a cronjob via sudo crontab -e Put this line at the end of the file:

      0 0 * * * journalctl --vacuum-size=1G >/dev/null 2>&1

      Everyday the logs will be trimmed to 1GB. Usually the logs are trimmed automatically at 4GB, but sometimes this does not work