39

Im using a program called Daisy Disk to see what is taking up space in my Mac and I find that the /cores directory is taking up 77gb.

Is that a problem? Can I get rid of it to regain the space?

enter image description here

1
  • What does launchctl limit core show for core size allowances? By default you should have nothing there with a soft limit of 0 size. Did you perhaps enable core dumps or can trace what specific files are being placed there?
    – bmike
    Commented Nov 17, 2015 at 23:22

1 Answer 1

55

Long story short, it's safe to delete them.

The /cores folder is where OS X stores Core Dumps. These are files that are intended for developers to trouble-shoot and diagnose faults in their software. They are generated as software crashes. If you're not a developer, or aren't testing software for a developer, then these files serve no purpose for you.

The files contain the state of the memory (or RAM) in your Mac at the time the crash happened. So lots of useful information for developers or testers to debug crashes. Not much use to anyone else.

By default, OS X is set up not to generate core dump files. If you type sudo launchctl limit core in a Terminal window it will respond with the soft and hard size limits of dump files it is allowed to create. Soft limit means the default for each process, however processes can change this if they require but only up to the value of the hard limit. By default the values in OS X seem to be "0 unlimited" means that the operating system won't create core dumps by default, but processes can elect to have unlimited core dump files created if they wish.

You can change the setting on your machine by simply entering sudo launchctl limit core 0 0 to disable the feature entirely. sudo launchctl limit core 0 unlimited will restore the default behaviour if it has been changed.

1
  • 4
    @turtlemonvh I strongly recommend against that command, since if the cd command fails it'll delete files wherever the user is. This person may've deleted important files because of this. Either couple the commands with && instead of ; (so it'll only run the second if the first succeeds), or use sudo find /cores -mtime +30 -type f -delete to skip the cd problem entirely. Commented Jan 4, 2020 at 5:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .