Tried rooting my Nexus 5, did something wrong and now it is stuck rebooting
Wiping cache normally fixes boot-loop issues. Before you proceed you will need to install ADB on your system.


Connect your device to your PC using a USB cable
Open a terminal and enter adb reboot recovery 
Use the volume buttons to scroll to "wipe data/factory reset" and press the Power button to select it.
Scroll down to "Yes - erase all user data" and press the Power button to select it.
Reboot the phone.


If your phone becomes unresponsive at any point during these steps, you can restart it by holding down the Power button for several seconds.