Skip to content

Instantly share code, notes, and snippets.

@tserj
Last active April 26, 2026 01:14
Show Gist options
  • Select an option

  • Save tserj/648350ac4c366bb392eacd893986759d to your computer and use it in GitHub Desktop.

Select an option

Save tserj/648350ac4c366bb392eacd893986759d to your computer and use it in GitHub Desktop.
Clean and memory limitation of log files

Open config:

sudo nano /etc/systemd/journald.conf

Set the folowing:

Storage=persistent
SystemMaxUse=50M
RuntimeMaxUse=10M
ForwardToSyslog=no

check the current usage:

journalctl --disk-usage

del all logs before last 3 days

sudo journalctl --vacuum-time=3d

check the current usage:

journalctl --disk-usage

restart service:

sudo systemctl restart systemd-journald

check the current memory usage:

top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment