The best way to get rid of wild onions is to dig up the patches of bulbs. Be careful that you go down deep enough to get the whole bulb as well as the small side bulblets. If this is not practical on the scale of your yard, you can spot treat them with an herbicide such as RoundUp. Apply it carefully, following the instructions to the letter. More or stronger is not better - be aware that you are using poison and take precautions.