The Confluence applications stores temporary files in the Confluence temporary directory. The location of the directory is located  in: <confluence_home>/temp.

There are a few methods that can help you determine which component of Confluence generated the file:

  • Open the file: allows you to view the contents of the file
  • Examine the file name and extension: Usually, the file name has a string prefix
    • eg backupxxxxx.zip - generated from the attachments plugin where users choose to 'download all attachments'
    • chartxxxxxxx.png - generated from the Charts macro plugin which generates the chart images to be displayed on the page.
    • jiraissuesxxxxx.html - generated from the Jira Issues Macro when the plugin gets issues content from JIRA.
  • Examine the creation time (timestamp) of similarly named files : This allows you to determine if the file is generated periodically, in which case this infers the file was created by a scheduled task. If the timestamps for the files are random, then the files are most likely generated at runtime (that is, during page rendering or by user actions).

Hint: 

Please refer to this article for the procedure change the schedule of the cleanup of the temporary directory.

To remove files manually from the command line one could issue a command (applicable to *nix) similar to:

find <confluence_home>/temp -name 'download*' -mmin +60 -print0 | xargs -0 rm -rf

as well as place the command in a cron job.