If there is a file (or image) field, when deleting a node, the corresponding file must be marked as not used by setting its status to 0, so that it can be automatically deleted when cron runs.

This is a relative question on drupal.stackexchange.com.

When generating content with devel_generate, there is an option that allows to delete all existing content of that type. However, when using this feature, the files do not get marked as not used and thus they are never deleted.

The same applies to mass-deleting users with image or file fields.

Comments

babis.p created an issue.