There is an automation mode feature built in to the micro:bit's interface chip which can be used to quickly erase the device. This could be used for example, to clear a large number of micro:bits ready for another lesson or workshop. To do this:

Check the version of interface firmware installed on your micro:bit

Connect the micro:bit via USB and browse to the DETAILS.TXT file on the micro:bit drive.

If the version is below 0241, update the firmware on the micro:bit

Enable automation mode

  1. Download the auto_on.cfg attachment and erase.act from this article.
  2. Hold down the RESET button on the back of the micro:bit and  drag the auto_on.cfg file to the MICROBIT drive. This will enable the automation feature. 
  3.  Let go of RESET and allow the micro:bit to boot up as usual.
  4. Open DETAILS.TXT again and make sure that you see Automation Allowed: 1 in the file.

Quick Erase

To erase the program on the micro:bit, drag erase.act onto the MICROBIT drive and it will quickly erase the whole program memory.

Further  Information

Enabling automation mode in DAPLink

Erasing program flash using an MSD command

Keywords for search: clear, memory, empty, reset, wipe, automation