Upgrading Nexus 5 from CyanogenMod 12.1 (Lollipop) to 13.0 (Marshmallow)
- On the phone, perform a Nandroid backup from ROM Manager
- Under Settings > Developer options, enable Android debugging
- Connect the phone via USB to your computer
- On your computer, run
[sudo] adb pull /mnt/shell/emulated/clockworkmod/backup
- Remove all backups on phone other than the most recent with
adb shell
- Update to the latest TWRP image
- Under settings > About Phone > CyanogenMod Updates, download the update–it will go in
/sdcard/cmupdater
- Download Google Apps for CyanogenMod 13Â (ARM, 6.0, Nano)
- Send the package to the phone with
adb push file /sdcard/.
- Unplug the phone
- Boot into recovery
- Wipe the System, Cache, & Dalvik partitions
- Install the CM snapshot and Open Gapps package
If you trigger an assert violation (radio, bootloader, etc), fulfill the requirement it complains about. These asserts are in place to make sure your firmware matches what CM13/Android 6.0.1 needs and you can actually use your device/phone as a device/phone.
I got repeated errors that com.android.phone has stopped.  This is the fix:
adb shell
rm -fr /data/data/com.android.providers.telephony/
rm -fr /data/data/com.android.phone/
exit