Garlic is said to kill any existing eggs and prevent female pinworms from laying more eggs. You can ingest it in small doses or apply it topically like a salve. If you wish to ingest the garlic, dice up a clove and mix it into pasta or sprinkle it on bread. You can also eat the garlic on its own.