Skip to end of metadata
Go to start of metadata

Plugin Information

View java.io.tmpdir cleaner on the plugin site for more information.

Jenkins and/or plugins can create some temporary files.
This plugin allows you to cleanup JVM temporary files.
This plugin will cleanup the directory java.io.tmpdir.

How to configure

TODO : configure it with the ui.

Currently you can configure some parameters with system properties when starting Jenkins:

recurrence cleaner execution : -Dhudson.plugins.tmpcleaner.TmpCleanWork.minutes=360 
extra directories to clean : -Dhudson.plugins.tmpcleaner.TmpCleanWork.extraDirectories=/var/tmp 
clean files not accessed since this number of days : -Dhudson.plugins.tmpcleaner.TmpCleanWork.days=1

Default values :

  • minutes : 360
  • extraDirectories : null
  • days : 7

Version History

Version 0.1 (2010-02-01)

  • Initial release

6 Comments

  1. This plugin looks like the right one for me. I have a Server-slave configuration, where the server runs on Windows and the slaves run on AIX. In the /tmp directory there are several hudson-remoting.... folders that seem to be empty and need to be removed. I start my slaves through ssh and they only run on an as needed basis for specially assigned jobs. They shut down after 15 minutes of idle time. Since they are only used for deployment purposes they are usually up for a short time.

    Is this use case supported by the plugin? And would it work with the default parameter? If not, what should the settings be?

  2. Does this plugin work on slaves or only the Master?

  3. Could anyone suggest How to configure these in UI and where exactly to configure these parameters:

    recurrence cleaner execution : -Dhudson.plugins.tmpcleaner.TmpCleanWork.minutes=360 
    extra directories to clean : -Dhudson.plugins.tmpcleaner.TmpCleanWork.extraDirectories=/var/tmp 
    clean files not accessed since this number of days : -Dhudson.plugins.tmpcleaner.TmpCleanWork.days=1
    
  4. I installed this Plug-in  and can see its working on the Jenkins nodes when the node is idle as per the below logs.

    log messages:
    
    Aug 06, 2013 6:32:28 AM hudson.plugins.tmpcleaner.TmpCleanTask visit
    INFO: Deleting empty directory /tmp/temp21355312158244871821375141636819/temp44941868668758424301375141636826
    Aug 06, 2013 6:32:28 AM hudson.plugins.tmpcleaner.TmpCleanTask visit
    INFO: Deleting /tmp/temp21355312158244871821375141636819/file4365940101757015296.xml (atime=1375141636, diff=-4511)
    Aug 06, 2013 6:32:28 AM hudson.plugins.tmpcleaner.TmpCleanTask visit
    INFO: Deleting /tmp/temp21355312158244871821375141636819/file8617138974662155049.exe (atime=1375141636, diff=-4511)
    Aug 06, 2013 6:32:28 AM hudson.plugins.tmpcleaner.TmpCleanTask visit
    INFO: Deleting empty directory /tmp/temp21355312158244871821375141636819
    Aug 06, 2013 6:32:28 AM hudson.plugins.tmpcleaner.TmpCleanTask call
    INFO:  end TmpCleanTask
    Aug 06, 2013 12:32:27 PM hudson.plugins.tmpcleaner.TmpCleanTask call
    INFO:  end TmpCleanTask
    

    But I want to configure some parameters with system properties as explained above. How to do it ?

    1. If you run on windows, edit the jenkins.xml to pas additional java -D arguments at JVM initialization.  If you run under Linux then modify the initialization script of the master to add in these options.

  5. Can I use this to specifically delete tmp files associated to a specific Job (job name + build number/queue id)? I am currently having disk space issues caused by large upload_*.tmp files that are not automatically deleted in /tmp directory even after the build is completed. I cannot just delete these files by schedule since there are instances wherein uploading files takes a long time and queued jobs use these files when finally built.