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:

  1. Modifying the "Files" admin view with delete button or VBO checkbox (the D8 VBO module provides a "Delete entity" action)
  2. 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

dsnopek created an issue. See original summary.

dsnopek’s picture

This is related to #3182275: File delete actions not exposed by default which is about exposing file deletion (as opposed to media deletion).