How to remove everything from an Android device? I would like to remove all files from my android device INCLUDING system files. I have tried 


  rm -r *


and other commands but when I switch the phone off the files reappear.
You can't do this from the OS or adb, you would have to do it from fastboot or recovery such as CWM or TWRP. 

fastboot erase all - note this will erase EVERYTHING, including your IMEI or MEID and other proprietary settings, the phone will likely be unrecoverable or unusable with most devices. It is blocked in some devices. Use with caution and understand the implications prior to doing this!!!

fastboot erase XXXX - Where XXXX is the partition you want to delete, like system, boot, userdata, etc. 

In TWRP or CWM, you could just format the various partitions. 

In most devices, these options would require an unlocked bootloader.