View Full Version : [ubuntu] Way to purge CUPS jobs older than 1 hour?

May 13th, 2011, 04:23 AM
Hey folks,

I've setup two printers through a system running Ubuntu server that are shared with 30-40 users on our school network.

If the printers run out of ink or paper, they stop printing. The lazier members of staff don't proceed to recharge the ink or paper so when somebody does, hours later, the old jobs start printing again which the teachers no longer need or want.

I'd like to automatically have my system purge print jobs older than 1 hour. I'm running CUPS and sharing the printers through SAMBA. How do I do this?


May 19th, 2011, 07:43 AM
Surely someone else has had this problem before me?

February 6th, 2013, 06:57 PM
I'm probably a little late to this party, but I stumbled upon your post while looking for a solution for my CentOS setup:

find /var/spool/cups/ -iname '[cd]*' -mmin +60 -delete && service cups restart

**edited -mmin to reflect 60 minutes, I had it set for 24 hours