Avoid by always purchasing sets from a reputable source and not growing onions on the same site more than two years running. Onions with red or yellow bulbs are less affected than white ones.
Onion sets are produced by growing onions from seed very close together ... Whichever method you use, check the stored onions every couple of weeks and remove any that are starting to sprout or feel ...