Elasticsearch creates empty directories in /tmp, can I delete these empty directories

Elasticsearch creates directories inside /tmp. These directories used to execute native code by jna and libffi. Most of the time these directories are empty and have the name like elasticsearch.KNoHBn19. more info here.

When running Elasticsearch for years it filled up /root directory due to the directories created by Elasticsearch in the /tmp. To override this, I can point Elasticsearch tmp directory to another disk via setting ES_TMPDIR. But still have thousands of empty directories.

Is it safe to remove these old empty directories created by Elasticsearch? Or Elasticsearch will use all the empty directories created in tmp.

Welcome to our community! :smiley:

/tmp is not /root though? Do you mean /?

They should be cleaned up on a system restart. Are they causing an issue?

sorry about the typo it's not /root its just root or /, :slight_smile:

instead of waiting restart, is that ok to manually clean the empty elasticsearch.XXXXX directories on /tmp. otherwise these directories are filling up the storage.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.