Erase allows you to erase all or parts of your DUT's flash.
 from lager import lager

 dut = lager.DUT()

 # Erase your device
 # 64k flash, start address 0x08000000
 dut.erase(address=0x08000000, length=65536)
Erase Section of DUT's Flash
~  lager debug erase 0x08000000 65536 --dut 1

Erase entire contents.
 # Erase entire flash
Erase Entire DUT Flash
~  lager debug erase --dut 1