Linux Journalctrl clear logs

Date: 2018-07-18

Source: https://unix.stackexchange.com/a/194058

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# Retain only the past two days:
journalctl --vacuum-time=2d
# Retain only the past 500 MB:
journalctl --vacuum-size=500M
# or edit /etc/systemd/journald.conf to set SystemMaxUse=100M
# show all errors since last boot
journalctl -p 3 -xb
# Retain only the past two days: journalctl --vacuum-time=2d # Retain only the past 500 MB: journalctl --vacuum-size=500M # or edit /etc/systemd/journald.conf to set SystemMaxUse=100M # show all errors since last boot journalctl -p 3 -xb
# Retain only the past two days:
journalctl --vacuum-time=2d

# Retain only the past 500 MB:
journalctl --vacuum-size=500M

# or edit /etc/systemd/journald.conf to set SystemMaxUse=100M

# show all errors since last boot
journalctl -p 3 -xb
11750cookie-checkLinux Journalctrl clear logs
0 of 2000 max characters.