Mayonnaise is a popular treatment for getting rid of head lice. It is affordable and safe. However, mayonnaise does not remove nits, the eggs laid by head lice. If you use mayonnaise to kill head lice, you will have to use another method, such as combing with a fine-toothed comb, to remove nits.