A good really cheap way to deworm a dog at home is to feed it a lot of garlic. The worms dong like the taste or smell so they will leave. They don't die, but at least they arnt in your dog anymore. I have used this on a few dogs and it always works. Just feed them as much garlic as they will eat without making them sick for about five days. Just to be safe, I feed my dog a bunch of garlic about once a month or so. It smells disgusting, but its more important to make sure your dog is healthy :)
You go to the store or ask your vet for wormer treatment I would know because I own hogs on a farm and we use it to. GOOD LUCK!!