So you have made myriad modifications on your phone and you want to just go back to stock. Or you want to sell it to someone and completely wipe everything stored on your Moto E. Folks at droid-developers have uploaded the original stock firmwares / ROMs of it.
ROMs for all variants of Moto E have been made available which includes XT1021, XT1022 and XT1025. Each firmware has a size of 400MB.
- Download the firmware from here.
To install them you have ADB and fast boot installed on your computer. After you have installed it, use these commands to flash it.
adb reboot bootloader fastboot flash recovery recovery.img fastboot reboot
Make sure you change the image file name to recovery.img before using above mentioned commands.