Jenkins Tmp Cleaner Plugin


It may happen that Jenkins can occupy too much space of /tmp directory. You can create your own script to clean directory or use one of numerous Jenkins plugins. Let Tmp Cleaner Plugin do the job. It is very easy to use and it doesn't require too much efforts configure desired options. Three options are available:

- recurrence cleaner execution
- extra directories to clean
- clean files not accessed since this number of days

It is only worth to mention that if you have Jenkins running as a service process, you may find it difficult to set listed above options as system properties when starting Jenkins. Then you simply need to add them to JENKINS_JAVA_OPTIONS variable in the file named "jenkins" (which is most probably located under /etc/sysconfig directory). For example,

 JENKINS_JAVA_OPTIONS="-Dhudson.plugins.tmpcleaner.TmpCleanWork.days=3"

And that's pretty much what you need to complete config!

Comments