A solid "leave it" command is the key. And it will have to be pretty darn solid to compete with some of the disgusting things your dog can find outside.
Start small with some of his normal kibble left stationary in front of him (or in your hand), and be ready to be fast to block your dog from grabbing it. Use a clear hand signal to show him, and reward with different, better treats the instant as he take his nose away. Gradually increase the amount of time he have to leave it alone before getting a reward. Once he starts getting the hang of the game, add in the words "leave it" right as he's about to take his nose away, and reward, reward, reward. The key is to always reward with something better than they would get if they didn't resist, so they learn that leaving things alone is the key to getting the really good stuff. Lunch meats, bits of hot dog, cheese, bacon, whatever your dog would kill for and doesn't get normally.
Once he's solid on leaving stationary things alone, you can mix it up by dropping things by him (again, be ready to block, because moving objects are infinitely more exciting than still ones!) and telling him to "leave it" - again, reward well!! Then up the value of the items you're asking him to ignore. Start using better treats, or more of them, while still rewarding with more and better things than you're tempting him with.
You can work on increasing the distance between you and the tempting goodies slowly, since the farther you are away, the harder it is to stop your dog from getting it, and you certainly don't want him to learn that "leave it" only means "leave it" when you're within a couple feet of him. Any time he fails, back up your training a bit to make sure he gets a couple successes in before moving forward. The more he practices success and the less he practices failures, the quicker he'll master the command.
Practice in as many situations as possible to up your chances of him expanding his definition of the command to include leaving things alone when you're in your house, in the yard, at a friend's house, on the street, etc etc. Over time you can phase out the rewards, using them less frequently, but still giving big delicious rewards randomly, and more consistently in new environments than in familiar ones.
https://www.youtube.com/watch?v=hQdg0...