Remove Block Directly From Database - Drupal 7
To delete a block programmatically using the Database API, try this:

$module = 'block';
$delta = 1;

// Get the block id (bid) required to delete the correct block from table 'block_custom'
$result = db_select('block', 'b')
         -&gt;fields('b', array('bid'))
         -&gt;condition('module', $module)
         -&gt;condition('delta', $delta)
         -&gt;execute();
$bid = $result-&gt;fetchField();

db_delete('block_custom')
  -&gt;condition('bid', $bid)
  -&gt;execute();

db_delete('block')
  -&gt;condition('module', $module)
  -&gt;condition('delta', $delta)
  -&gt;execute();

db_delete('block_role')
  -&gt;condition('module', $module)
  -&gt;condition('delta', $delta)
  -&gt;execute();


When creating custom blocks through the Drupal Block UI, the module name is block and the delta value is an integer. Be sure to use the correct delta value to delete the desired block.