Just as an example, if you take a photo of me with your camera and I explicitly tell you to not publish the photo you are not allowed to [0], even if the photo is stored on your own drive. I can’t force you to delete the photo, you are free to keep it and show it to your friends but you are definitely not allowed to publish it.
[0] There are certain narrow exceptions in the respective German law but they don’t apply in this case.