You probably have issues with emotional eating. When you get the urge to eat junk ask yourself the following:
1. What is wrong that I'm trying to fix?
2. What else could I be doing to fix the problem?
3. Wouldn't I be happier overall if I was at my goal weight?
4. If I still want this, could I be happy with just a bite or two?
5. What am I going to do later to offset this indulgence?
Ideally you'll stop at question 1, 2 or 3 but questions 4 and 5 are how you can handle if you still decide to have a treat.
Also, if a food makes you want to frequently eat when you are not hungry then don't keep it in the house until you've gained more control over that food. If it is something you have to keep in the house because of a family member wanting it then put it somewhere you won't see it (out of sight out of mind).