How to disable/hide /unset a block programatically?
You could try hook_block_list_alter to hide a specific block.

Act on blocks prior to rendering.
This hook allows you to add, remove or modify blocks in the block list. The block list contains the block definitions, not the rendered blocks. The blocks are rendered after the modules have had a chance to manipulate the block list.