Rituals that are meant to ward off bad luck are apotropaic. You may have your own apotropaic superstitions, like avoiding stepping on a crack or crossing your fingers.
Ancient civilizations had plenty of apotropaic magic, ceremonies, and actions that were believed to keep evil away, and so do modern people. Egyptian amulets, witches' marks cut into wood, crosses or horseshoes hung above doorways, knocking on wood, and good luck charms are all considered to be apotropaic. Apotropaic is from the Greek apotropaios, "averting evil," and its roots, apo, "away," and trepein, "to turn."