How do I wipe Nexus 4?
Factory Reset will delete all your data, and restore your phone as if it were brand new.

On the other hand, flashing a new ROM is one way to change another version (usually to a higher version or a custom ROM) of Android. In this case, data is retained, unless you do a full wipe, which is equivalent to a Factory Reset.

A Factory Reset is sufficient in your case.

Other questions:
What is hard reset and what is factory reset?