break a/the habit
To stop doing a routine action or activity. I struggled to break the habit of biting my nails, but getting regular manicures helped.
break a habit
and break the habit; break one's habitto end a habit. I was not able to break the habit of snoring. It's hard to break a habit that you have had for a long time.