A couple of ideas. Sounds like your dog is getting at the household garbage, as in breaking into the can. My father in law did something to help his dog with this issue, and I'm going to get flack that it's abusive. So trust me I don't abuse my dogs but I think it could work. He actually made his dog fearful of the garbage can by placing the dog inside the can, he put the lid on for awhile but let him out shortly afterwards. That dog never went near a garbage can again!
But, you might want to assess the underlying issue. My guess is your dog is lacking in some activity, is bored wants to get into things and maybe isn't get enough nutrition in his regular diet. You could try more 'treats inside toys' to distract him. But I've known dogs who are just garbage dogs plain and simple. I use that apple anti-itch spray you can get at the pet store. Most dogs hate the taste of it, hence why it works when you spray things like your shoes that you don't want the dog to eat. When my dog misbehaves I sometimes squirt that in her mouth and she hates it. I've also used straight lemon juice, seems to work as well.
Also, teach your dog the word 'no' and the command 'leave it'. This has saved us time and time again. For the leave it command we would put treats on the floor in front of our dog and say leave it. If our dog left it alone, we gave her a DIFFERENT treat. Also handy common to teach your dog not to take food off of the tables. You can place a treat viewable to the dog, on the edge sort of it and also do the leave it trick. Then once your dog understands this, maybe make the garbage super tempting to him, take a few pieces out, tip it on it's side, make it so easily accessible to him. And then go about your business, watch some tv and let him go towards the garbage. When he's near, command him to 'leave it'. This may help but as soon as you leave him alone with the garbage he may just go to it anyways.
Definitely I agree with the others, the garbage needs a lid on it. Anything easily accessible to a dog is just too tempting. Maybe drag it to a room that can be closed, or under the sink like someone else suggested.
Pet owner, pet sitter.