Choose your language

Choose your login

Contact us

Temp folder cleanup

This page applies to:

As part of its regular operations, PaperCut NG/MF stores files in the temp folder. When the application server is shut down, it removes the temporary files again.

On rare occasions, PaperCut NG/MF might not get to perform the cleanup. This happens when the server process terminates unexpectedly. Possible reasons include the server running out of memory, or the process being terminated manually via the task manager.

Particularly after generating PDF reports, the files left behind can occupy a considerable amount of disk space. PaperCut NG/MF therefore regularly deletes selected files files from the temp folder. The cleanup runs during the server’s startup.

The minimum age for files to qualify for removal can be configured in [app-path]/server/server.properties. For new installations, this file already contains the required configuration properties. For preexisting installations you might need to copy them from [app-path]/server/server.properties.template. The template file is kept up to date with every upgrade.

The configuration properties indicate how many days ago files must have been created before they can be removed. If set to zero, the respective files are always deleted during startup, independent of their age.

The cleanup currently only applies to temporary font files used for PDF reports. Their minimum age can be configured with the following configuration property:

temp-folder-cleanup.font-files.min-age-in-days=60

The automatic cleanup is a housekeeping tool for occasional leftovers. A frequent accumulation of orphaned files might point to an underlying problem, like PaperCut terminating unexpectedly after running out of memory. Applying a more aggressive cleanup policy can be used as a workaround, but it does not solve the underlying problem and should always be accompanied by a root cause analysis.

Comments