When I was grew up and first absorbed mainstream Australian social conventions, the hug was a little-used greeting. Some examples: grannies hugged their grandchildren on meeting them after a longish absence, mothers hugged infants to comfort them when they ran indoors after sustaining a play-related injury, and couples hugged when when the male returned home after a prolonged period of military service.
Little by little, the hug seems to have spread into other domains of social interaction - much to my discomfort. I am not a hugger (except for family and close friends). A person who knows me well has remarked on this awkwardness in casual hugging situations - he has said (not unkindly, just an observation of fact) that I am a "pod" (c.f. Invasion of the Body Snatchers).
So, what is a pod to do? When gratuitously hugged by an aquaintance or friend-of-a-friend who should know better, I have: (a) gone limp with hands dangling until the hugger has had his or her way with me; (b) hugged back with feigned enthusiasm and held on for an indecently long period; (c) emitted an agonised groan and limped away with an apparent back injury.
The problem with these strategies is that they don't actually avoid the impending hug. (I had thought of pepper spray but this is hard to obtain and probably not warranted given the lack of hostile intent on the part of the hugger. )
The good news is that I have found a non-confrontational hug-avoidance technique which can be employed in a millisecond and is 100% effective. The picture adjacent says it all. Practice and develop a facial expression which is so perversely and fiendishly friendly that the potential hugger is completely repelled at the very thought of physical contact.