publish: switch to a more sane mega reset function

generated from commit baf3c0a4b8e73eb74a96b3241bc91019e3b17791