There are several ways. The one that is simpler:
1. Go to the device settings ---> section recovery ---> make a backup ----> click to reset the system. Then the system will do everything by itself
Demolish the system? Yes, easy) Download any software for flashing your phone and connecting the phone, start uploading the firmware and unplug the cable in a minute. Voila, everything is demolished, you have a "brick"