Be for doing any thing you have to Backup your Nexus 5 Data See this guide Here
1. Make sure your phone has
USB Debugging enabled in Developer Options. If you don't have this option in Settings already, go to Settings > About Phone and tap Build Number until the notification that Developer Options have been enabled pops up. Then back out a step and you'll see it at the bottom of your Settings menu.
2. Make sure you have the
Nexus 5 Android USB Drivers installed on your PC.
3. Double check your Nexus 5 battery is charged, and if not, charge that bad boy!
4. Open the ADB Tools folder on your PC. If you don't have it installed already
download ADB Tools here.Make sure Fastboot is in your ADB Tools folder. /
5. Ensure Fastboot lives in the ADB Tools folder once you're done installing. If it doesn't,
download Fastboot for Windows.
6.
Download SuperSU v2.46 on your PC too.
7. Copy the
SuperSU zip file to the root directory of your
Nexus 5 (temporarily turn off
USB Debugging if your PC doesn't recognize your Nexus 5 is connected). To do this, connect your Nexus 5 to your PC with a USB cable and copy the file to the place where all the root folders are: not in a folder.Drop
SuperSU in the root directory of your
Nexus 5. /
8.
Download ClockworkMod custom recovery to your PC and put it in the Platform Tools directory.
9. Restart your
Nexus 5 in
Fastboot. Turn it off, then press and hold Power and Volume Down until you see the
Fastboot menu. You should still be connected to the PC with a
USB cable.
10. Open a Windows Explorer window and head to the Platform Tools folder.This is the Command prompt window. /
11. In a blank space in the window, hold Shift and right click your mouse. You'll want to click on Open Command Window Here.
12. Type in the following command:
fastboot flash recovery recovery-clockwork-touch-6.0.4.5-hammerhead.img
13. Use the volume keys to select Recovery Mode on your Nexus 5 and hit Power to enter it.This is Fastboot on the Nexus 5: hit Power to enter Recovery Mode. /
14. From
CWM, use the volume keys to select ''install zip'' and hit Power to confirm, then select ''choose zip from SD card'' – no prizes for guessing what comes next.
15. Locate the SuperSU zip you copied over earlier (it should appear at the bottom of the list in /sdcard/0/) and press power to confirm your selection, reconfirm and wait until you see the notification at the bottom of the screen that says ''Install from SD card complete''.Locate the SuperSU zip you copied over earlier and flash it. /
16. Back out to the main menu and reboot your Nexus 5. Make sure you tell your recovery to fix root!
17. The first boot may take ages (this is why you charged your battery) – don't freak out. Go have a cup of tea and let it do its thing. Do NOT unplug your phone from your PC or winged monkeys will fly through the window and do all kinds of terrible things to you.
18. Once your Nexus 5 has rebooted, that's it. You're rooted and ready to roll with SuperSU installed. Install
RootChecker from the Play Store to double check your root status and grant it superuser access. If you get a green confirmation message you're all sorted.
19. If you get stuck in a bootloop (meaning after a long time your phone still hasn't booted up normally), you can switch it off, reboot into Fastboot, go to Recovery and wipe data, wipe cache partition and reboot again. That should do the trick.
Source : ANDROIDPIT