Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

File Delete (extras)

22,516 sites Security covered Drupal 10–11
View on drupal.org

This module allows administrators to delete files uploaded to Drupal sites, including those used by other users. It can change files to a temporary status for later cron deletion, offers immediate deletion options, and prevents deletion of files still in use.

Functionality landed in core 10.1 #2949017: There is no way to delete file entities of other users

The File Delete module adds the ability to easily delete files —both private and public— within Drupal administration.

It changes files from the "Permanent" status to the "Temporary" status. These files will be deleted by Drupal during its cron runs.

If a file is registered as being used somewhere, the Module will not allow it to be deleted.

Differences from core functionality

  • Built in safeguard that won't delete a file that has usage.
  • Option to delete form immediately, skipping core's file cleanup step.
  • Option to force delete a file, skipping the built-in access check.
  • Bulk plugins for doing mass deletions.

Other modules to consider

Media file delete - Media file delete gives content editors the option to delete the associated file when deleting a media entity.


Usage Notes

File is set to 'Temporary' but not getting deleted after a cron run

In Drupal, Temporary files generally kept for some time — default 6 hours — before being deleted.
You can configure this time in Administration » Configuration » Media » File System

Working with Drupal Media

If you added an image to the website as a Drupal Media entity, you will have to follow these steps.

  1. Important: Confirm that this Media is not being used in your site.
  2. Delete this Media entity in Administration » Content » Media
  3. Now you can delete the file in Administration » Content » Files

Why is this the case?
Drupal's File Usage system still needs some work. It does not correctly track all usages within Drupal. Most of the work related to this is being tracked in #2821423: Dealing with unexpected file deletion due to incorrect file usage
Specific to Drupal Media, the work is being tracked in #2835840: Track media usage and present it to the site builder (in the media library, media view, on media deletion confirmation, etc.)

Depends on

Dependencies of the latest stable release

  • file Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Dec 2024
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.0.3 Stable 10–11 Jun 17, 2026
3.0.2 Stable 10–11 Jan 28, 2026
3.0.1 Stable 10–11 Jan 5, 2026
3.0.0 Stable 10–11 Jan 3, 2025
3.0.x-dev Dev 10–11 Dec 20, 2024