From a55824da416ec5d4b9a3443f0f921fff2c1b91a6 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sun, 21 Feb 2021 16:11:46 -0500 Subject: [PATCH] New Post --- content/blog/clearingsystemdlogs.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 content/blog/clearingsystemdlogs.md diff --git a/content/blog/clearingsystemdlogs.md b/content/blog/clearingsystemdlogs.md new file mode 100644 index 0000000..945f2cf --- /dev/null +++ b/content/blog/clearingsystemdlogs.md @@ -0,0 +1,21 @@ +--- +title: "Clearing Systemd Logs" +date: 2021-02-21T16:08:51-05:00 +draft: false +tags: [] +--- + +Short post today. I wanted to clear out some disk space usage on one of my servers and noticed that the systemd logs were taking up a decent bit. Here are two options to clear out old logs. + +Here is an example to do it by time, let's say 15 days: + +```bash +journalctl --vacuum-time=15d +``` + +An example to clear it by total disk usage, let's say 10Gb: + +```bash +journalctl --vacuum-size=10G +``` +