I'm looking for a way to remove any trace of old coredumps in coredumpctl list. At the moment it lists coredumps beginning at 2014-12-14 - I've updated software so often between then and now that I doubt those old coredumps are going to help me debug any problems now. Unfortunately removing the files from /var/lib/systemd/coredump only made the asterisk in the "PRESENT" column of coredumpctls output disappear.

I couldn't find any way to remove all information about coredumps in the manpages or in the help output of coredumpctl.

  • There is no such capability yet (and just deleting the dumps is technically not the right way either). So, for as much as the other "solutions" don't even seem to address the issue directly, this is the best atm. – mirh Sep 5 '20 at 13:57

It seems the metadata is kept in the systemd journal, so it is gone after

rm /var/log/journal/*/*
killall -9 systemd-journald

The downside is that all other syslog is gone as well.

Maybe the cleaner method would be the one given in How to clear journalctl

journalctl --vacuum-time=2d
  • 14
    It's not a solution. It's not even a workaround. It's an action that deletes all the logged stuff as well as the dumps. Not good! – EnzoR Dec 2 '18 at 11:24

journalctl ONLY archives journal files, it does not include coredump files, unless specifically set Storage=journal. So the accepted answer is NOT correct.

e.g. journalctl --vacuum-time=7d keeps no older than 7 days' worth of journal.

The closest I can find is the coredump.conf file, use MaxUse to enforce disk space taken by externally (default Storage=external) stored core dumps, defaults to /var/lib/systemd/coredump.

check kernel.core_pattern

cat /proc/sys/kernel/core_pattern
|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h


  • > So the accepted answer is NOT correct. - that's why there is no accepted answer :-) – Wieland Oct 8 '20 at 12:09
  • @Wieland Ah, yes. I thought the most upvoted one was... – Terry Wang Oct 8 '20 at 22:37

First you may prune the journal discarding entries older than a day:

journalctl --vacuum-time=1d

Since "coredumpctl list" lists the dumpfiles recorded by the journal, you may manually delete the dump files from /var/lib/systemd/coredump that are not listed.

coredumpctl list

Browse the dump files, compare the files with the results from the command and delete the files not listed.

  • 9
    It's not a solution. It's not even a workaround. It's an action that deletes a lot of the logged stuff in the attempt to delete the dumps. Also not good! – EnzoR Dec 2 '18 at 11:25
  • Who ever wanted to build up a library of core dumps in the first place? You fix the bug and forget, right? – Adrian May Jul 20 '19 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.