[Nexus 6  General] mikeadamz:
Tired of waiting for the OTA? Can't use it because you're rooted? Don't want to wipe your entire phone? No problem! Here's how you can upgrade with Google's Nexus factory images without wiping your apps or sdcard.

NOTE: You must have your bootloader unlocked. If you've never unlocked your bootloader, I don't think there's any way to do this without wiping your data.

STEP 1: Install fastboot

Fastboot is Google's utility for flashing factory images. You can also use it to flash custom recoveries like TWRP and CWM. The standard way to get is is through Google's Android SDK, but that's a bit heavy-duty, so you can also download just the most important tools (fastboot and adb) separately, packaged by users. Here are some links:

Official Google Android SDK (cross-platform): http://developer.android.com/sdk/index.html#Other[1]

Unofficial for Windows: http://developer.android.com/sdk/index.html#Other[2]

Unofficial Mac/Linux: http://code.google.com/p/adb-fastboot-install/[3]

Windows users might also need to install drivers: http://developer.android.com/sdk/win-usb.html[4] (can any Windows users confirm whether it's necessary?)

STEP 2: Prepare factory image

Download the latest Nexus 6 factory image at https://developers.google.com/android/nexus/images#shamu[5]

Unzip it and open the resulting folder

Unzip the "image-shamu-*.zip" file in there

You should now be looking at something like this: http://i.imgur.com/mzrfwrP.png [6]

STEP 3: Flash! (Ah-ahhhhh! [7] )

Connect your phone to your computer via USB, and enter the bootloader. You can enter the bootloader by holding down the power and volume-down buttons to boot. Once you see the bootloader, you can release the buttons.

Open a terminal/command prompt. The syntax might be slightly different on Windows than on Mac or Linux, but basically the same. Anything you see in <> you need to replace, e.g. with the actual path to your factory image folder. The rest you should be able to copy and paste. (Tip: you can easily enter a folder path into your terminal/command prompt by simply dragging the folder onto your terminal window. This works on Mac, Windows, and the vast majority of Linux GUIs.) Enter these commands:

cd </path/to/shamu-lmy47d>

fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img

Reboot the bootloader.

fastboot flash radio radio-shamu-d4.0-9625-02.95.img

cd <image-shamu-lmy47d>

fastboot flash boot boot.img

fastboot flash cache cache.img

fastboot flash system system.img

If you DO NOT use a custom recovery (like TWRP or CWM), then also: fastboot flash recovery recovery.img

Don't worry if you see messages like "target reported max download size of 1073741824 bytes". Just wait and let it finish.

Reboot your phone and enjoy. It's normal for the first boot to take a while. Going from Kitkat to Lollipop took about 20 minutes. Going from 5.0 to 5.0.1 took 5-10, I think. YMMV.

A WORD OF WARNING: If you're moving between ROMs, you generally should do a complete reset, including wiping data. Many users have reported problems going from KitKat to Lollipop without wiping data and recommend a factory reset anyway. If you're okay with wiping everything, you can simply use Google's included flash-all scripts, or flash the userdata.img file yourself. Personally, I'm not going to bother wiping adta for an incremental update like 5.0.1->5.1. As always, be sure to back up your data!

Shamelessly stolen from: http://www.reddit.com/r/Nexus5/comments/2phqy7/howto_upgrade_android_using_nexus_factory_images/