Could not delete temporary file "%path" during garbage collection

Error Type: 
Core Module
File name: 

Drupal makes use of periodic cron operations to perform some house cleaning tasks to keep your Drupal installation healthy. One of the things it likes to check is for stale managed files. Managed files are ones that are uploaded to Drupal, where Drupal keeps a record of those files in the database, for example so that they can be referenced from nodes or users.

Some managed files are temporary, and so to optimise resource usage Drupal will remove those files from the database and from the filesystem once their expiry time has passed.


While trying to delete a temporary file something went wrong. The most likely cause is that you have a file permissions problem that is preventing your webserver from deleting this file, and possibly others from your filesystem. It is also possible that somehow an invalid URI for the file has been stored in the database, but this is less likely and might only be seen if you have some contrib or custom module that is badly behaved.


Try checking file permissions on sites/XXX/files an ensure that the webserver has appropriate access to files.


Our aim is to add enough detailed information to each of the Drupal error messages that Drupal developers will be able to fix their own problems. This exercise will take some time to complete, at the last count we had almost 700 error messages in the system.

If your site is suffering from this error message please contact us and ask us to expedite the solution to this error and we will do our best to add a solution as soon as possible.