Other intestinal worm infections are also treated with medicines that kill the parasite without harming the person, such as albendazole, mebendazole, ivermectin and praziquantel. Your doctor or a gastroenterologist will advise on the appropriate medicine and the dose. The worms are then usually passed out of the body.