• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Hundreds of cache_xxxx files in /tmp

PSi_101

Regular Pleskian
In my /tmp directory there are hundreds of files named cache_xxxxxxx, some dating back 5 months ago. I figure Horde is leaving these files behind, but is there a way to make Horde cleanup after itself?
 
Hi PSi_101,

one solution could be to setup a cron task with for example:

find /tmp "cache*" -mtime +1 -exec rm -f {} \;

( deletes found files with the name "cache*" in the directory "/tmp", which are older than 1 day )
Another way is to use "tmpwatch" => http://linux.die.net/man/8/tmpwatch


Optional, you could setup horde, to use another location for it's temporary files ( "/tmp" might be too small, or you just want to have more control over possible horde - temp - files... ) and you could again use a cron task to empty that folder on a regular basis. To achieve this goal, you would for example create the desired folder where ever you would like to and add for example at "/usr/share/psa-horde/config/conf.local.php":

Code:
$conf['tmpdir'] = '/where/ever/you/want/to/horde_cache';


Yes, it's correct... horde for example misses to delete temporary files from time to time and there is no additional automatic removal procedure configured, which takes care about the "lost garbage" :D
 
Thanks @UFHH01 I think i'm going to have to do what you suggested. It would have been nice if Horde cleaned up itself but it is what it is.
This is what i've settled on which should handle other tmp files as well:

find /tmp -name "*" -atime +30 | xargs rm -f
 
Last edited:
Back
Top