Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, Drupal doesn't delete managed files when they are no longer used:
https://www.drupal.org/node/2891902
And doesn't provide any way to manually delete managed files, either.
While deleting files is a pretty rare thing to need, it should at least be possible!
I propose:
- Modifying the "Files" admin view with delete button or VBO checkbox (the D8 VBO module provides a "Delete entity" action)
- Deleting a Media entity should delete the underlying file. Users think of the Media as being the file AND given the Media library they should be aware of the fact that a Media entity can be used in multiple places (which they may not totally understand with files)
Comments
Comment #2
dsnopekThis is related to #3182275: File delete actions not exposed by default which is about exposing file deletion (as opposed to media deletion).