/var/log/journal huge/too large solution in Debian Mint Ubuntu Linux Howot Fix

Is your /var/log/journal overweight and bloated?  For example a decent install of Debian 11 with most applications and services ends up being about 4.9G with the journal taking a few gigs. 

du -hs /var/log/journal/
1.3G    /var/log/journal/

By default in a lot of distributions there is no maximum size so it will keep growing.  This is especially problematic for embedded distributions and devices, but is also a huge waste of space.  In low IO storage devices it can actually create huge IOWait as well (eg. if you are running off a USB stick).

Edit this file: 

/etc/systemd/journald.conf

Create a new line under the commented out #SystemMaxUse= line

And set it like this:

SystemMaxUse=50M

Where 50M is going to be the maximum size of /var/log/journal

It should now look like below.

 

 

 

Final Step

Restart journald to apply the new smaller max setting:

systemctl restart systemd-journald
 

du now shows the size is the maximum you set:

du -hs /var/log/journal/
49M    /var/log/journal/


Tags:

var, debian, mint, ubuntu, linux, howot, fixis, overweight, bloated, install, applications, gigs, hs, default, distributions, maximum, problematic, embedded, devices, io, iowait, eg, usb, edit, etc, systemd, journald, conf, commented, systemmaxuse, restart, systemctl,

Latest Articles

  • docker / kubernetes breaks Proxmox QEMU KVM Bridge VMs
  • How To Change Storage Location in Docker.io
  • RTL8812BU and RTL8822BU Linux Driver Ubuntu Setup Archer T3U Plus
  • Kazam video blank/high size and not working when recording solution
  • Cisco UC CME How To Enable Licensed Features
  • from pip._internal.cli.main import main File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60 sys.stderr.write(f"ERROR: {exc}") from pip._internal.cli.main import main File "/usr/local/lib/python3.5/dist-packag
  • ModuleNotFoundError: No module named 'pip._internal' solution python
  • grub blank screen how to manually boot kernel and initrd Linux Ubuntu Debian Centos won't boot solution
  • Cisco Switch / Router How To Restore Factory Default Settings
  • Cisco 2900 3900 Router Password Reset How To Reset Enable Password
  • How To Install convert MBR Legacy booting GRUB to EFI from a non-EFI Linux Environment Ubuntu Mint Debian
  • Translating "cisco" ...domain server (255.255.255.255) Cisco Router/Switch Solution
  • Error opening tftp://10.0.2.2/network-confg (Permission denied) - How To Fix Cisco Router Switch Error Solution Console
  • GRUB error: invalid arch-independent ELF magic. Solution How To Fix Linux Centos Ubuntu Mint
  • How to find out which package a file belongs to in Debian Mint Ubuntu Linux
  • Centos 7 not mounting /etc/fstab partitions
  • CentOS 7 / 8 cannot boot with with mdadm RAID array solution
  • How To Add Default Gateway in Linux using the ip route command routing
  • Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist Solution for Centos8 yum package install error
  • md mdadm array inactive how to start and activate the RAID array