I used a dog dewormer I bought at petsmart. Since it doesn't dissolve in water very well, I crushed it, mixed it with water and let some bloodworms soak for half an hour. Fed it once a day for a week and did a huge water change.
Also, it's not safe if you have snails in your tank. Forgot the name of the medicine but it was fenbendazole based I think