Keeping your nose clean means are you staying out of trouble
Boy: "Did you see that your homeboy got locked up for drug possession?"Girl: "Yeah, I know he is your friend, but I hope you are keeping your nose clean."