Garlic and parasites

How long will I have to feed my dog pieces of raw fresh garlic go get Rid of tapeworms? I know to much can be toxic but just a little a day can boost ur dogs immune system and fight off parasites such as different kinds of worms my dog has tape worms so should I do if for about 2 weeks? Its a much more affordable home remedy