Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Download Tracker 1.0.6 Minor update available for module download_tracker (1.0.6). Release: Admin Navigation 1.1.3 Minor update available for module admin_navigation (1.1.3). Release: Schema Org Mapper 1.0.3 Minor update available for module schema_org_mapper (1.0.3). Release: Soundcite 2.0.8 Minor update available for module soundcite (2.0.8). Release: Fills 2.0.0 Major update available for theme fills (2.0.0). Release: FlowDrop 2.6.0-alpha3 New alpha version released for module flowdrop (2.6.0-alpha3). Release: ConReg 1.0.0-beta4 New beta version released for module conreg (1.0.0-beta4). Release: Yoyaku Booking Engine 1.0.0-alpha4 New alpha version released for module yoyaku (1.0.0-alpha4). Module Revived: Bootstrap Colors 2.0.1 Module bootstrap_colors updated after 19 months of inactivity (2.0.1). Security Coverage: Soundcite Module soundcite now has official Drupal security advisory coverage.

Media file delete

17,996 sites Security covered Drupal 8–11
View on drupal.org

This module allows content editors to delete the associated file when deleting a media entity. It includes safeguards to prevent accidental deletion if the file is still in use or if the user lacks sufficient permissions. An optional permission can be granted to bypass these restrictions, and integration with the Entity Usage module is available for more comprehensive usage tracking.

Overview

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

Features

  • Give content editors the option to delete the associated file when deleting a media entity
  • Prevents deletion if the file is in use in other locations
  • Prevents deletion if the user does not have access
  • Adds a new 'delete any file' permission, allowing power-users to bypass core's You can only delete files you own behaviour
  • Optional support for the Entity Usage module when determining if the file is in use. Enable the Media File Delete Entity Usage sub-module to turn this functionality on. This will allow you to prevent deletion if there are uses of the file not tracked by core's File usage API e.g. direct links in body fields to the file.

Configuration/Installation

  • Download and install the module like normal
  • Optionally grant the 'delete any file' permission to users
  • Delete a media item, and note the confirmation form

Requirements

Requires the Media and File modules from core.

Known problems

Please use the issue queue to report issues.

Similar modules

  • File delete however this doesn't delete the file immediately, instead it relies on garbage collection

Depends on

Dependencies of the latest stable release

  • file Drupal core
  • media Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.3.2 Stable 8–11 Jun 22, 2026