Duplicate images

I had this problem before and I really messed things up to the point of having to reinstall and start from scratch. I have duplicate entries in a couple of my albums. When I FTP in, I only see one entry. Aside from starting all over, how do I rectify this AND how do I prevent it from happening in the future?