Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 12
    This is the top search result when looking for a way to clear journal entries. However, none of the answers below actually answer the question, because they either delete old logs or all logs. None of them are about clearing recent or specific logs. I posted a guide for deleting specific log entries at unix.stackexchange.com/questions/272662/… Commented Oct 27, 2020 at 23:00
  • 8
    I got the best result with journalctl --flush --rotate --vacuum-time=1s and journalctl --user --flush --rotate --vacuum-time=1s. Commented Apr 22, 2023 at 14:36
  • 1
    @Rob, no. The question asks to clear logs, not delete specific ones. Though you input might be valuable for some too. Commented Jan 14, 2024 at 10:35
  • To see the correct answer, see Jan Warchoł's answer (currently ranked #3, and NOT marked as accepted answer). @accdias's answer in the comment above is good too. Commented Jul 24, 2024 at 4:37