Most puppies tend to pick up everything from the ground no matter what it is. This is, of course, highly undesirable. Here are some simple but useful tips to help you correct your puppy's behavior.
Try to distract the puppy's attention from filth he may want to pick up from the ground.

Rule number one: you have to be first to notice things your puppy may be interested in

This means that you should spot people, other dogs, cats, and so on before your pup has noticed them. Once you notice something or someone that might be of interest for your pup, try to distract the puppy's attention from it. Show him a toy or try to run away inviting him to follow you. Don't forget to take some treats and praise your pup once he's done everything right. It is recommended to walk your pup on the leash because it's always better to have a safe walk rather than to run about looking for risky adventures.

Use a bowl to feed your pup

The pup doesn't know the difference between the floor in your house and the ground outdoors. If it is used to picking up pieces of food that fell down from your dinner table, don't think he realizes why you get angry when he does the same outside. Therefore, it's important that the pup has his own food bowl and always uses it. If you want to give him a treat but you don't want to put it in the bowl, give it to him from your hand. Never offer a treat by dropping it on the floor.

Train your pup

Go outside and put your pup's favourite treats on the ground. Put the pup on leash and lead him to the treats. Stop his attempts to pick them up, saying a short correcting command at the same time (for example, a firm "No!"). Training your pup to stop picking up filth from the ground is a task that requires your constant attention, patience and persistence. The bad habit may come back if you stop being consistent.

Provide your dog with a high quality diet full of vitamins and minerals

If your puppy tends to pick up filth because of a lack of nutrients, it's going to be nearly impossible to break this habit because this behaviour is a result of his natural needs. Make sure you provide your puppy with a high quality and well-balanced diet.