Proper medication will take care of your dog's internal whipworm problem, and then you are left with the difficult job of getting rid of whipworms in the yard to prevent re-infestation. Whipworm eggs can live through freezing and extreme heat. They can live in the soil for years, and females lay up to 2000 eggs a day. Topical treatments aren't likely to work. The only way to get rid of whipworm in the soil of your yard is to get down, dirty and use a lot of elbow grease.
Remove the top six inches of soil with a shovel in any area where your dog has freedom to roam in your yard. Fill the area with clean top soil and grass. If the area is very large and complete removal isn't possible, use a garden tiller to stir up the soil. When you use the tiller procedure, you have to spread strong chemicals to the dirt and mix it in well. The best choice is agricultural lime, which will dry out the soil and kill off whipworm eggs.
Bleach any hard surface areas that are porous and can still harbor eggs such as concrete, brick or stone paths, driveways or patios.
Spread food-grade diatomaceous earth over the top of the soil on a monthly basis to destroy fresh whipworms before they can get into the soil. You should also re-apply the diatomaceous earth after heavy rains. This is especially important if your yard is not fenced in, allowing stray dogs to wander around your yard.
Use a pooper scooper or baggie-covered hand to remove any fresh feces immediately after your dog defecates in the yard. Even after treatment, your dog can pass whipworm in the stool for several days. It is always a good idea to keep the yard clear of waste products that can attract pests.