Synopsis: to prepare your Nexus 4, first wipe cache partition and then upgrade to Android 5.10.
- Wiping Cache Partition
- If your phone is on, hold the Power button to restart it.
- Hold the appropriate device-specific buttons until you see the word "Start" in green and a large Android robot on its back.
On the Nexus⁴: Press and hold the Volume Down, Volume Up, and Power buttons at the same time for several seconds.
- Press the Volume Down button twice to highlight "Recovery mode," then press Power button. The words "Google" will show on the screen followed by an image of a small Android robot on its back with a red exclamation mark and the words "No command."
- While holding down the Power button, press the Volume Up button. Some menu options will appear.
- Use the volume buttons to scroll to "wipe cache partition" and press the Power button to select it. It takes up to 10 minutes to complete the process. Problems can occur if one is impatient and attempts to reboot during this process, so it's best to just let it complete.
- After the cache is wiped, scroll to "reboot system now" and press the Power button again to restart the device.
To make the above instructions more meaningful, on Youtube is this video on how to wipe the cache partition on the Google Nexus 4.
After clearing the cache, download and install the Android 5.10 OTA update.
Commentary: after wiping the cache partition, I upgraded my Nexus 4 to Android 5.1 without any issue.
Thanks to saadro for the Wiping cache partition instructions in: https://code.google.com/p/android/issues/detail?id=80149#c86