• Home
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • All
  • About
Linux-Ubuntu | Clear systemd journal logs
Remove journal files older than specified time (e.g., 7 days):
$ sudo journalctl --vacuum-time=7d

Reduce disk usage below specified size (e.g., 1 G):
$ sudo journalctl --vacuum-size=1G

Clear journal logs:
$ sudo journalctl --rotate
$ sudo journalctl --vacuum-time=1s

Show total disk usage of all journal files:
journalctl --disk-usage
Archived and active journals take up 64.0M in the file system.

Journal files location:
$ ls -al /var/log/journal/
drwxr-sr-x+  2 root systemd-journal 16384 0c9f3b205edb4888bbfc1d819d4454e3
$ ls -al /var/log/journal/0c9f3b205edb4888bbfc1d819d4454e3
-rw-r-----+ 1 root systemd-journal 25165824 system.journal
-rw-r-----+ 1 root systemd-journal 16777216 user-1000.journal
-rw-r-----+ 1 root systemd-journal  8388608 user-1001.journal
-rw-r-----+ 1 root systemd-journal  8388608 user-1003.journal
-rw-r-----+ 1 root systemd-journal  8388608 user-54324.journal
© 2025  mtitek