Changing focus is key.
It can be hard to change habits however instead of trying 'not to do something' you start focusing on doing something else entirely great changes can happen. Try it. You do need it enforce it few times but you can drop a lot of bad habits this way just because it doesnt matter to you anymore.