Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This module provides drush support to delete unused files from database (table files_managed) and from the file system. It was developed because of a customized migrate media migration. While deleting a node with media file attached the file entry gets removed from file_usage table but not from file_managed. See issue [#2444549] Media and file cleanup.

Use drush file-delete-unused to confirm each file before deletion or drush file-delete-unused --all to confirm once to delete all unused files. Be careful, because some modules might have uploaded files without proper database registration. You should only delete the files where you are sure that they aren't used anymore. The deletion of files could not be undone.

See instructions on how to install the file delete sandbox module.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Created by osopolar on , updated