l told my pap and mam I was going to be a mountain man; acted like they was gut-shot. Make your life go here. Here's where the peoples is. Mother Gue, I says, the Rocky Mountains is the marrow of the world, and by God, I was right. - Del Gue
They tested a bunch of methods for removing earworms. The best turned out to be doing simple math problems in your head. It is theorized that earworms result from brain inactivity-- it starts idling. Doing simple math problems will get it out of idle and the earworm goes away. Keeping it away might require a ball peen hammer.
I've always found that singing ELO's "I can't get it out of my head" works for me.
BTW: If you're looking for a catchy earworm:
When Angus was in grade school, he learned it, and used to sing it incessantly.