title: How to delete generated bitstreams in DSpace 6x?
body: <p>I would like to delete all the bitstreams generated by filter-media but only with a specific description <strong>"IM Thumbnail"</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/PIWbf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PIWbf.png" alt="Item Bitstreams"></a></p>
  
  <p>I am aware that I can just regenerate the thumbnail by using the <code>-f</code> flag to force it to regenerate the thumbnail. I am testing some settings in my setup and I would just like to delete the generated thumbnails with this specific description first.</p>
  
  <p>I've tried tinkering the database via PgAdmin but I can only go as far as selecting the bitstreams. I don't even know how to group or order the returned results and not really sure if I've selected the correct tables.</p>
  
  <pre><code>SELECT 
    * 
  FROM 
    public.bitstream, 
    public.bundle, 
    public.bundle2bitstream, 
    public.metadatavalue, 
    public.item2bundle
  WHERE 
    bitstream.uuid = metadatavalue.dspace_object_id AND
    bitstream.uuid = bundle2bitstream.bitstream_id AND
    bundle.uuid = item2bundle.bundle_id AND
    bundle2bitstream.bundle_id = bundle.uuid AND
    metadatavalue.text_value = 'IM Thumbnail';
  </code></pre>
  
  <p>Any advice on how to do this via database manipulation or any other means would be greatly appreciated. Applying the SQL deletion within a specific community or collection would be a really nice bonus too!</p>
  
  <p>Thanks in advance!</p>