Delete Unused Assets is a simple plugin allowing you to optimize your project by deleting all unused assets in one click.
It can also detect which assets are used only in a draft or in a revision to let you the opportunity to delete them as well.
The plugin checks the relations table to determine if an asset is used ("related to") anything.
Updates and accessibility:
You can now change the default colors for the assets usage display.
The plugin checks the relations table, so it should work in almost every cases.
However, and even though the plugin has been thoroughly tested with Craft, Craft Commerce, and most typical Craft installations, it still involves the hard deletion of content, you should therefore use it with caution.
We strongly advise you to have backups of your data, assets, and database in case anything goes wrong.
If any third-party plugin or custom code uses assets from your volumes without recording the relation in the Craft database, you *will* permanently lose them.
Additionally, if the volume from which you want to delete assets is shared by other users, softwares or Craft installations (i.e a staging installation sharing an Amazon S3 volume with the production environment), the plugin will check for relations with the database linked to the project from which it is run. This means it may delete assets that are potentially used elsewhere.