From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Clear old systemd journal data

Clear old systemd journal data - Linux Tutorial

From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep

Start my 1-month free trial

Clear old systemd journal data

- [Instructor] By default, the systemd journal is not persistent and only runs in RAM. However, as soon as you make it persistent, the journals can stack up, consuming large amounts of disk space. In a previous video, we made our journal persistent by creating the /var/log/journal directory and restarting the systemd-journald service. We haven't been using our system with a persistent journal for very long, so our journals won't be very large. However, let's take a look. Type in sudo space journalctl space dash dash disk dash usage and hit Enter. This shows we're only using 16 megabytes of space. On a production system, this may end up being gigabytes or more. You can also use the du command to get the size of the journal directory. Type in sudo space du space dash sh for summary and human readable space slash var slash log slash journal and hit Enter. Note the du command only shows the amount of disk space used…

Contents