When an application crashes violently on Ubuntu Linux (usually resulting in a segmentation fault), the operating system’s kernel steps in and takes a snapshot of the application’s working memory at the exact moment of death. This snapshot is called a “core dump,” and it is automatically saved to your hard drive so that software developers can analyze the crash later to fix the bug.
While core dumps are incredibly valuable for developers, they are practically useless for the average user. Worse, if you are running a heavy application (like a video editor or a large database) that crashes frequently, these core dumps can be massive—often several gigabytes in size. Ubuntu’s systemd-coredump daemon will silently fill up your root partition with these massive files, eventually causing your entire system to run out of disk space and crash.
You can configure systemd to completely ignore application crashes, forcing it to immediately discard the memory data instead of writing it to your disk.
How to Disable Core Dumps in Ubuntu
You must edit the systemd configuration file to enforce a strict size limit of zero bytes.
- Open your terminal application (
Ctrl+Alt+T). - Open the systemd coredump configuration file in a text editor (like nano) with root privileges:
sudo nano /etc/systemd/coredump.conf - Look for the section labeled
[Coredump]. - You will likely see a list of variables that are commented out with a hash (
#). Scroll down to the bottom of that section and add the following two lines:Storage=noneProcessSizeMax=0 - Press Ctrl+O then Enter to save the file, and Ctrl+X to exit nano.
- To apply the changes immediately without restarting your computer, restart the systemd daemon:
sudo systemctl daemon-reload
Ubuntu will no longer generate or store core dump files. When an application crashes, it will simply close, and your hard drive space will remain perfectly safe from runaway logging.