deleting photos from device
When using the Photos app it will do that for you.  

If you use the Gallery app it will only manipulate the local images, therefore deleting the local ones. The Gallery app comes with Nexus 4.