cups spamming /tmp

Hi, has anybody found a way to stop cups filling up /tmp?

For each printed file I do not only get some files in /var/spool/cups:
Code:
-rw-------   1 root  cups     1256 May  2 12:21 c00142
-rw-------   1 root  cups     1241 May  2 12:22 c00143
-rw-r-----   1 root  cups    67831 May  2 12:21 d00142-001
-rw-r-----   1 root  cups   219080 May  2 12:22 d00143-001
These seem okay and get somehow managed.
But I also get these in /tmp. and they just fill up:
Code:
lrwxr-xr-x   1 pmc   wheel         40 May  2 12:21 5ccac4bb9e557 -> /usr/local/etc/cups/ppd/CUPS-lpd-lja.ppd
lrwxr-xr-x   1 pmc   wheel         46 May  2 12:21 5ccac4bd2322b -> /usr/local/etc/cups/ppd/CUPS-rem1-s-a3high.ppd
lrwxr-xr-x   1 pmc   wheel         46 May  2 12:21 5ccac4be73ddf -> /usr/local/etc/cups/ppd/CUPS-rem1-s-a3high.ppd
-rw-------   1 pmc   wheel      67831 May  2 12:21 0355b5cd2540f
lrwxr-xr-x   1 pmc   wheel         40 May  2 12:22 5ccac4cd27237 -> /usr/local/etc/cups/ppd/CUPS-lpd-lja.ppd
lrwxr-xr-x   1 pmc   wheel         46 May  2 12:22 5ccac4ce8a77b -> /usr/local/etc/cups/ppd/CUPS-rem1-s-a3high.ppd
lrwxr-xr-x   1 pmc   wheel         46 May  2 12:22 5ccac4d05a3cf -> /usr/local/etc/cups/ppd/CUPS-rem1-s-a3high.ppd
-rw-------   1 pmc   wheel     219080 May  2 12:22 035665cd0b4c6
 
In /etc/rc.conf I got: clear_tmp_enable="YES".

This takes care of /tmp in the course of system startup. This is fine for me, since I frequently power down systems when not needed - for the sake of energy efficiency. If you never happen to restart your system, then this setting won’t help of course. Then you would need to distinguish somehow the stuff left over by CUPS from perhaps still needed other items, and place a respective script into your crontab(5).

The script could contain something like:
find /tmp -depth 1 -type l -and -lname "/usr/local/etc/cups/ppd/CUPS-*" -exec rm {} +
 
periodic.conf() also has some options to clean up /tmp.

The defaults are :

Code:
# 110.clean-tmps
daily_clean_tmps_enable="NO"                            # Delete stuff daily
daily_clean_tmps_dirs="/tmp"                            # Delete under here
daily_clean_tmps_days="3"                               # If not accessed for
daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group .snap"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore .sujournal"
                                                        # Don't delete these
daily_clean_tmps_verbose="YES"                          # Mention files deleted

enabling these in /etc/periodic.conf.local might be an option too.
 
Alright, got the point.
In my youth, children were taught to clean up their stuff behind them.
 
Back
Top