If you are craving unhealthy foods it could mean you are lacking some nutrients.

If you are craving chocolate your body is lacking magnesium.  Try eating nuts, seeds, legumes, or fruits.

If you are craving sugary foods or sweets your body can be lacking the following

Chromium, try eating Broccoli, grapes, cheese, or chicken or Carbon, try eating fresh fruit to curb that craving.

If you are craving bread or pasta your body is lacking Nitrogen.  Try eating high protein foods such as chicken or nuts.

If you are craving salty foods your body is lacking Chloride.  Feed your body fish or goats milk to curb that craving.

And if you just plan overeat generally try eating an orange, apple, or add more vitamin C.  Drink a glass of water before each meal to help you feel full to help limit over eating.