How to decrease disk usage by journal

Recently I found out using my favourite “ncdu” util that journal (system log files on SystemD system) on my system are taking more space than I need (not mentioning that I use for log files mainly CloudWatch logs as Amazon EC2 service).

--- /var/log/journal ----------
                         /..
    1.0 GiB [##########] /12c36bdd57404a23b2f7311ffba3dd1c

This does not seems a lot but I have to mention that my virtual machine uses 10GB of hard drive so 1Gig is pretty lot considering that I do not need it.

There is also command with journalctl which you can use to find out size of your log files without ncdu

# journalctl --disk-usage
Archived and active journals take up 992.6M in the file system.

Main thing how to change usage of journalctl file is by editing file below

# vi /etc/systemd/journald.conf

I have decreased log file size and number of files. Also I have limited log to 86400 seconds (1 day). All commented lines should be defaults.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
SystemMaxFileSize=10M
SystemMaxFiles=10
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
MaxRetentionSec=86400
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K

After editing this file it is pretty enough just to restart journald service.

# systemctl restart systemd-journald